]> Pileus Git - ~andy/gtk/commitdiff
Reset pointers pointing to the old model. (#154350)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 4 Oct 2004 03:33:59 +0000 (03:33 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 4 Oct 2004 03:33:59 +0000 (03:33 +0000)
2004-10-03  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkiconview.c (gtk_icon_view_set_model): Reset pointers
pointing to the old model.  (#154350)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkiconview.c

index 2bcdd75536f329ccc97fa21f0c9443ce58203155..72b10b5b10346c91cb8cfd1afb8382e20341cd15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-10-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Reset pointers
+       pointing to the old model.  (#154350)
+
        * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
        sizes array.  (#154310, Christian Persch)
 
index 2bcdd75536f329ccc97fa21f0c9443ce58203155..72b10b5b10346c91cb8cfd1afb8382e20341cd15 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Reset pointers
+       pointing to the old model.  (#154350)
+
        * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
        sizes array.  (#154310, Christian Persch)
 
index 2bcdd75536f329ccc97fa21f0c9443ce58203155..72b10b5b10346c91cb8cfd1afb8382e20341cd15 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Reset pointers
+       pointing to the old model.  (#154350)
+
        * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
        sizes array.  (#154310, Christian Persch)
 
index 2bcdd75536f329ccc97fa21f0c9443ce58203155..72b10b5b10346c91cb8cfd1afb8382e20341cd15 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkiconview.c (gtk_icon_view_set_model): Reset pointers
+       pointing to the old model.  (#154350)
+
        * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
        sizes array.  (#154310, Christian Persch)
 
index 514234b47f4cbc1fc95548425a11571e0f891a7a..1d9a46ec5c4160a61cc97a736e2c061699c1a632 100644 (file)
@@ -2947,9 +2947,7 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
                         GtkTreeModel *model)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
-
-  if (model != NULL)
-    g_return_if_fail (GTK_IS_TREE_MODEL (model));
+  g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
   
   if (icon_view->priv->model == model)
     return;
@@ -2998,6 +2996,9 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
       g_list_foreach (icon_view->priv->items, (GFunc)gtk_icon_view_item_free, NULL);
       g_list_free (icon_view->priv->items);
       icon_view->priv->items = NULL;
+      icon_view->priv->anchor_item = NULL;
+      icon_view->priv->cursor_item = NULL;
+      icon_view->priv->last_single_clicked = NULL;
     }
 
   icon_view->priv->model = model;