GtkApplication: Insert separators after sections
The previous code was only inserting a separator when a new section was starting right away, which may not always be the case.
This commit is contained in:
parent
9131849eec
commit
5705a330c2
@ -555,7 +555,6 @@ append_items_from_model (GtkMenuShell *menu,
|
||||
w = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (w);
|
||||
gtk_menu_shell_append (menu, w);
|
||||
|
||||
*need_separator = FALSE;
|
||||
}
|
||||
|
||||
@ -579,6 +578,14 @@ append_items_from_model (GtkMenuShell *menu,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*need_separator)
|
||||
{
|
||||
w = gtk_separator_menu_item_new ();
|
||||
gtk_widget_show (w);
|
||||
gtk_menu_shell_append (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