From 5fe95f2b3d336e4f51371ab2b11590c49ead9a24 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 9 Mar 2005 16:02:03 +0000 Subject: [PATCH] Queue a resize when the model is unset. (#169528, Tomislav Jonjic) 2005-03-09 Matthias Clasen * gtk/gtkiconview.c (gtk_icon_view_set_model): Queue a resize when the model is unset. (#169528, Tomislav Jonjic) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkiconview.c | 8 ++++++-- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f647f6f8e9..4b72a45cc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-09 Matthias Clasen + + * gtk/gtkiconview.c (gtk_icon_view_set_model): Queue a resize + when the model is unset. (#169528, Tomislav Jonjic) + Thu Mar 3 16:59:44 2005 Manish Singh * configure.in: URL escape the '+' in gtk+ in the bugzilla URL. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f647f6f8e9..4b72a45cc4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-03-09 Matthias Clasen + + * gtk/gtkiconview.c (gtk_icon_view_set_model): Queue a resize + when the model is unset. (#169528, Tomislav Jonjic) + Thu Mar 3 16:59:44 2005 Manish Singh * configure.in: URL escape the '+' in gtk+ in the bugzilla URL. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f647f6f8e9..4b72a45cc4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-03-09 Matthias Clasen + + * gtk/gtkiconview.c (gtk_icon_view_set_model): Queue a resize + when the model is unset. (#169528, Tomislav Jonjic) + Thu Mar 3 16:59:44 2005 Manish Singh * configure.in: URL escape the '+' in gtk+ in the bugzilla URL. diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 3cde871395..6fa51b9c73 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -3234,6 +3234,8 @@ gtk_icon_view_set_model (GtkIconView *icon_view, icon_view->priv->anchor_item = NULL; icon_view->priv->cursor_item = NULL; icon_view->priv->last_single_clicked = NULL; + icon_view->priv->width = 0; + icon_view->priv->height = 0; } icon_view->priv->model = model; @@ -3259,9 +3261,11 @@ gtk_icon_view_set_model (GtkIconView *icon_view, icon_view); gtk_icon_view_build_items (icon_view); - } - gtk_icon_view_queue_layout (icon_view); + gtk_icon_view_queue_layout (icon_view); + } + else + gtk_widget_queue_resize (GTK_WIDGET (icon_view)); g_object_notify (G_OBJECT (icon_view), "model"); }