Commit 49ba32e1 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Reset pointers pointing to the old model. (#154350)

2004-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_set_model): Reset pointers
	pointing to the old model.  (#154350)
parent a2ca8d59
2004-10-03 Matthias Clasen <mclasen@redhat.com> 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 * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
sizes array. (#154310, Christian Persch) sizes array. (#154310, Christian Persch)
......
2004-10-03 Matthias Clasen <mclasen@redhat.com> 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 * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
sizes array. (#154310, Christian Persch) sizes array. (#154310, Christian Persch)
......
2004-10-03 Matthias Clasen <mclasen@redhat.com> 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 * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
sizes array. (#154310, Christian Persch) sizes array. (#154310, Christian Persch)
......
2004-10-03 Matthias Clasen <mclasen@redhat.com> 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 * gtk/gtkwindow.c (icon_list_from_theme): Don't leak the
sizes array. (#154310, Christian Persch) sizes array. (#154310, Christian Persch)
......
...@@ -2947,9 +2947,7 @@ gtk_icon_view_set_model (GtkIconView *icon_view, ...@@ -2947,9 +2947,7 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
GtkTreeModel *model) GtkTreeModel *model)
{ {
g_return_if_fail (GTK_IS_ICON_VIEW (icon_view)); g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
if (model != NULL)
g_return_if_fail (GTK_IS_TREE_MODEL (model));
if (icon_view->priv->model == model) if (icon_view->priv->model == model)
return; return;
...@@ -2998,6 +2996,9 @@ gtk_icon_view_set_model (GtkIconView *icon_view, ...@@ -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_foreach (icon_view->priv->items, (GFunc)gtk_icon_view_item_free, NULL);
g_list_free (icon_view->priv->items); g_list_free (icon_view->priv->items);
icon_view->priv->items = NULL; 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; icon_view->priv->model = model;
......
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