summaryrefslogtreecommitdiff
path: root/gtk/gtkiconview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-03-09 16:09:22 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-03-09 16:09:22 +0000
commit32492c4be4ad637e7f667e6f982b3a18ab27e58b (patch)
tree53b92c958376026bfbf0bcb0c48ca1a9d27a5bae /gtk/gtkiconview.c
parentf01ab587f567cf5518a393d2e0a055a1c103be78 (diff)
downloadgdk-pixbuf-32492c4be4ad637e7f667e6f982b3a18ab27e58b.tar.gz
Queue a resize when the model is unset. (#169528, Tomislav Jonjic)
2005-03-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtkiconview.c (gtk_icon_view_set_model): Queue a resize when the model is unset. (#169528, Tomislav Jonjic)
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r--gtk/gtkiconview.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index ba505c637..8fc55ca32 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,11 +3261,14 @@ 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);
+ }
g_object_notify (G_OBJECT (icon_view), "model");
+
+ if (GTK_WIDGET_REALIZED (icon_view))
+ gtk_widget_queue_resize (GTK_WIDGET (icon_view));
}
/**