Commit 5b29d3d5 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Check column types on the new model, and check them all. (#159389, Olivier

2004-11-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
	new model, and check them all.  (#159389, Olivier Andrieu)
parent 54c67437
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
new model, and check them all. (#159389, Olivier Andrieu)
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg)
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
new model, and check them all. (#159389, Olivier Andrieu)
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg)
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
new model, and check them all. (#159389, Olivier Andrieu)
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg)
......
2004-11-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkiconview.c (gtk_icon_view_set_model): Check column types on the
new model, and check them all. (#159389, Olivier Andrieu)
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
Don't crash if Xlib fails to return UTF-8. (#159373, Kristian Høgsberg)
......
......@@ -2955,24 +2955,32 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
if (model)
{
GType pixbuf_column_type, text_column_type;
GType column_type;
g_return_if_fail (gtk_tree_model_get_flags (model) & GTK_TREE_MODEL_LIST_ONLY);
if (icon_view->priv->pixbuf_column != -1)
{
pixbuf_column_type = gtk_tree_model_get_column_type (icon_view->priv->model,
icon_view->priv->pixbuf_column);
column_type = gtk_tree_model_get_column_type (model,
icon_view->priv->pixbuf_column);
g_return_if_fail (pixbuf_column_type == GDK_TYPE_PIXBUF);
g_return_if_fail (column_type == GDK_TYPE_PIXBUF);
}
if (icon_view->priv->text_column != -1)
{
text_column_type = gtk_tree_model_get_column_type (icon_view->priv->model,
icon_view->priv->pixbuf_column);
column_type = gtk_tree_model_get_column_type (model,
icon_view->priv->text_column);
g_return_if_fail (column_type == G_TYPE_STRING);
}
g_return_if_fail (text_column_type == G_TYPE_STRING);
if (icon_view->priv->markup_column != -1)
{
column_type = gtk_tree_model_get_column_type (model,
icon_view->priv->markup_column);
g_return_if_fail (column_type == G_TYPE_STRING);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment