mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
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:
parent
5aee67793f
commit
9131849eec
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user