diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-11-26 23:42:33 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-12-19 12:45:51 -0500 |
commit | 9131849eec81898630f189e8320d39854062a4f1 (patch) | |
tree | 79f672c0961ea48a8e070df2b8d1daaedcac1d85 /tests/testgmenu.c | |
parent | 5aee67793fdd172fb4e9bdfa2871d1d0ffa6720c (diff) | |
download | gtk+-9131849eec81898630f189e8320d39854062a4f1.tar.gz |
testgmenu: Insert separators after sections
The previous code was only inserting a separator when a new
section was starting right away.
Diffstat (limited to 'tests/testgmenu.c')
-rw-r--r-- | tests/testgmenu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/testgmenu.c b/tests/testgmenu.c index faa35e204b..ab70a74f69 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -289,7 +289,6 @@ append_items_from_model (GtkWidget *menu, w = gtk_separator_menu_item_new (); gtk_widget_show (w); gtk_menu_shell_append (GTK_MENU_SHELL (menu), w); - *need_separator = FALSE; } @@ -318,6 +317,14 @@ append_items_from_model (GtkWidget *menu, continue; } + if (*need_separator) + { + w = gtk_separator_menu_item_new (); + gtk_widget_show (w); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), w); + *need_separator = FALSE; + } + menuitem = create_menuitem_from_model (model, i, group); if ((m = g_menu_model_get_item_link (model, i, G_MENU_LINK_SUBMENU))) |