Only append separator to bookmarks if the array isn't empty
This commit is contained in:
parent
6eb17e1b15
commit
f34223e55d
1 changed files with 8 additions and 3 deletions
|
@ -2071,9 +2071,14 @@ _action_bookmarks_populate_popup (GtkAction* action,
|
|||
GtkMenu* menu,
|
||||
MidoriBrowser* browser)
|
||||
{
|
||||
GtkWidget* menuitem = gtk_separator_menu_item_new ();
|
||||
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
GtkWidget* menuitem;
|
||||
|
||||
if (katze_array_get_nth_item (browser->bookmarks, 0))
|
||||
{
|
||||
menuitem = gtk_separator_menu_item_new ();
|
||||
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
}
|
||||
menuitem = gtk_action_create_menu_item (
|
||||
_action_by_name (browser, "BookmarkAdd"));
|
||||
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
|
||||
|
|
Loading…
Reference in a new issue