From: Enrico Tröger Date: Sat, 28 Mar 2009 19:57:42 +0000 (+0100) Subject: Only append separator to bookmarks if the array isn't empty X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f34223e55dc2574e59d5c250c27fb271d46a01b8;p=midori Only append separator to bookmarks if the array isn't empty --- diff --git a/midori/midori-browser.c b/midori/midori-browser.c index b03063aa..7e95a7e8 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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);