testgmenu: Insert separators after sections

The previous code was only inserting a separator when a new
section was starting right away.
This commit is contained in:
Matthias Clasen 2011-11-26 23:42:33 -05:00 committed by Ryan Lortie
parent 5aee67793f
commit 9131849eec

View File

@ -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)))