diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-12-01 20:49:05 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-12-19 12:51:10 -0500 |
commit | e7b6fa4449aade9f7a719b140204fe46a97b865f (patch) | |
tree | eba4525a8ea13b40ed26d3bb3fc978e0ee48b129 | |
parent | 612e24dfc6fcd93c0b02db7ccffe51fd31cc247b (diff) | |
download | gtk+-e7b6fa4449aade9f7a719b140204fe46a97b865f.tar.gz |
Only add a separator when a section ends
-rw-r--r-- | tests/testgmenu.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/testgmenu.c b/tests/testgmenu.c index 5fb657ceb6..9fd5258cee 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -314,15 +314,16 @@ append_items_from_model (GtkWidget *menu, append_items_from_model (menu, m, group, need_separator, label); g_object_unref (m); g_free (label); - 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; + 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; + } + + continue; } menuitem = create_menuitem_from_model (model, i, group); |