midori_browser_set_current_page (browser, n);
}
+static void
+_action_private_browsing_activate (GtkAction* action,
+ MidoriBrowser* browser)
+{
+ const gchar* uri = midori_browser_get_current_uri (browser);
+ /* FIXME: Use the same binary that is running right now */
+ sokoke_spawn_program ("midori -a", uri, FALSE);
+}
+
static void
_action_open_activate (GtkAction* action,
MidoriBrowser* browser)
static const GtkActionEntry actions[] = {
{ "TabNew" },
{ "WindowNew" },
+ { "PrivateBrowsing" },
{ "Open" },
#if HAVE_HILDON
{ "Find" },
#else
{ "Print" },
{ "About" },
- { "PrivateBrowsing" },
- { "ManageSearchEngines" },
{ NULL },
{ "Menubar" },
{ "Bookmarkbar" },
{ "TabNew", STOCK_TAB_NEW,
NULL, "<Ctrl>t",
N_("Open a new tab"), G_CALLBACK (_action_tab_new_activate) },
+ { "PrivateBrowsing", NULL,
+ N_("P_rivate Browsing"), "<Ctrl><Shift>n",
+ N_("Don't save any private data while browsing"),
+ G_CALLBACK (_action_private_browsing_activate), },
{ "Open", GTK_STOCK_OPEN,
NULL, "<Ctrl>o",
N_("Open a file"), G_CALLBACK (_action_open_activate) },
static const guint entries_n = G_N_ELEMENTS (entries);
static const GtkToggleActionEntry toggle_entries[] = {
- { "PrivateBrowsing", NULL,
- N_("P_rivate Browsing"), "",
- N_("Don't save any private data while browsing"),
- NULL/*G_CALLBACK (_action_private_browsing_activate)*/,
- FALSE },
-
{ "Menubar", NULL,
N_("_Menubar"), "",
N_("Show menubar"), G_CALLBACK (_action_menubar_activate),
"<menu action='File'>"
"<menuitem action='WindowNew'/>"
"<menuitem action='TabNew'/>"
+ "<menuitem action='PrivateBrowsing'/>"
"<separator/>"
"<menuitem action='Open'/>"
"<separator/>"
"<menuitem action='WindowClose'/>"
"<separator/>"
"<menuitem action='Print'/>"
- "<menuitem action='PrivateBrowsing'/>"
"<separator/>"
"<menuitem action='Quit'/>"
"</menu>"
g_signal_connect (forward, "button-press-event",
G_CALLBACK (midori_browser_menu_item_middle_click_event_cb), browser);
-
- _action_set_visible (browser, "PrivateBrowsing", FALSE);
#if HAVE_HILDON
_action_set_visible (browser, "Menubar", FALSE);
#endif
menuitem = sokoke_action_create_popup_menu_item (
gtk_action_group_get_action (actions, "Fullscreen"));
gtk_menu_shell_append (menu_shell, menuitem);
+ menuitem = sokoke_action_create_popup_menu_item (
+ gtk_action_group_get_action (actions, "PrivateBrowsing"));
+ gtk_menu_shell_append (menu_shell, menuitem);
#else
gtk_menu_shell_append (menu_shell, gtk_separator_menu_item_new ());
menuitem = sokoke_action_create_popup_menu_item (