Only add a separator when a section ends
This commit is contained in:
committed by
Ryan Lortie
parent
612e24dfc6
commit
e7b6fa4449
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user