diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-07-04 06:51:57 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-07-04 06:51:57 +0000 |
commit | 8ee1ebf8192c572a7b395003ae4b54e72e4393c2 (patch) | |
tree | df4020fb3385fc34162bcf1ca9a5416267ce09af /gtk/gtkmenubar.c | |
parent | 6eba56d74230698eacc0942f9375c04cf422b1fd (diff) | |
download | gtk+-8ee1ebf8192c572a7b395003ae4b54e72e4393c2.tar.gz |
Queue a resize on the contained menuitems as well.
2005-07-04 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenubar.c (gtk_menu_bar_set_pack_direction)
(gtk_menu_bar_set_child_pack_direction): Queue a resize
on the contained menuitems as well.
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 61b991e1d2..c2427b553f 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -892,6 +892,7 @@ void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar, GtkPackDirection pack_dir) { GtkMenuBarPrivate *priv; + GList *l; g_return_if_fail (GTK_IS_MENU_BAR (menubar)); @@ -902,6 +903,10 @@ void gtk_menu_bar_set_pack_direction (GtkMenuBar *menubar, priv->pack_direction = pack_dir; gtk_widget_queue_resize (GTK_WIDGET (menubar)); + + for (l = GTK_MENU_SHELL (menubar)->children; l; l = l->next) + gtk_widget_queue_resize (GTK_WIDGET (l->data)); + g_object_notify (G_OBJECT (menubar), "pack-direction"); } } @@ -943,6 +948,7 @@ void gtk_menu_bar_set_child_pack_direction (GtkMenuBar *menubar, GtkPackDirection child_pack_dir) { GtkMenuBarPrivate *priv; + GList *l; g_return_if_fail (GTK_IS_MENU_BAR (menubar)); @@ -953,6 +959,10 @@ void gtk_menu_bar_set_child_pack_direction (GtkMenuBar *menubar, priv->child_pack_direction = child_pack_dir; gtk_widget_queue_resize (GTK_WIDGET (menubar)); + + for (l = GTK_MENU_SHELL (menubar)->children; l; l = l->next) + gtk_widget_queue_resize (GTK_WIDGET (l->data)); + g_object_notify (G_OBJECT (menubar), "child-pack-direction"); } } |