gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
gtk_widget_show (menuitem);
}
+ menuitem = gtk_action_create_menu_item (
+ _action_by_name (browser, "BookmarkFolderAdd"));
+ 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);
midori_browser_edit_bookmark_dialog_new (browser, NULL, TRUE, FALSE);
}
+static void
+_action_bookmark_folder_add_activate (GtkAction* action,
+ MidoriBrowser* browser)
+{
+ midori_browser_edit_bookmark_dialog_new (browser, NULL, TRUE, TRUE);
+}
+
static void
_action_manage_search_engines_activate (GtkAction* action,
MidoriBrowser* browser)
{ "BookmarkAdd", STOCK_BOOKMARK_ADD,
NULL, "<Ctrl>d",
N_("Add a new bookmark"), G_CALLBACK (_action_bookmark_add_activate) },
+ { "BookmarkFolderAdd", GTK_STOCK_DIRECTORY,
+ N_("Add a new folder"), "",
+ N_("Add a new bookmark folder"), G_CALLBACK (_action_bookmark_folder_add_activate) },
{ "Tools", NULL, N_("_Tools") },
{ "ManageSearchEngines", GTK_STOCK_PROPERTIES,
N_("_Manage Search Engines"), "<Ctrl><Alt>s",
"<menu action='Dummy'>"
"<menuitem action='FindPrevious'/>"
"<menuitem action='BookmarkAdd'/>"
+ "<menuitem action='BookmarkFolderAdd'/>"
"<menuitem action='TabPrevious'/>"
"<menuitem action='TabNext'/>"
"<menuitem action='UndoTabClose'/>"
browser->bookmarks, NULL);
_action_set_sensitive (browser, "BookmarkAdd", FALSE);
+ _action_set_sensitive (browser, "BookmarkFolderAdd", FALSE);
if (!browser->bookmarks)
return;
G_CALLBACK (browser_bookmarks_remove_item_cb), browser);
_action_set_sensitive (browser, "BookmarkAdd", TRUE);
+ _action_set_sensitive (browser, "BookmarkFolderAdd", TRUE);
}
static void