From 9131849eec81898630f189e8320d39854062a4f1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 26 Nov 2011 23:42:33 -0500 Subject: [PATCH] testgmenu: Insert separators after sections The previous code was only inserting a separator when a new section was starting right away. --- tests/testgmenu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)))