Only add separators when a section actually ends

This commit is contained in:
Matthias Clasen 2011-12-01 18:13:15 -05:00 committed by Ryan Lortie
parent 064999cb2a
commit 45e9d09eab

View File

@ -740,15 +740,16 @@ append_items_from_model (GtkMenuShell *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 (menu, w);
*need_separator = FALSE;
if (*need_separator)
{
w = gtk_separator_menu_item_new ();
gtk_widget_show (w);
gtk_menu_shell_append (menu, w);
*need_separator = FALSE;
}
continue;
}
menuitem = create_menuitem_from_model (model, i, group);