From f34223e55dc2574e59d5c250c27fb271d46a01b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Sat, 28 Mar 2009 20:57:42 +0100 Subject: [PATCH] Only append separator to bookmarks if the array isn't empty --- midori/midori-browser.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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); -- 2.39.5