diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 007e91d1..042d8560 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -2849,6 +2849,11 @@ _action_menubar_activate (GtkToggleAction* action, _midori_browser_save_toolbar_items (browser); } } + + g_object_set_data (G_OBJECT (browser), "midori-toolbars-visible", + GTK_WIDGET_VISIBLE (browser->menubar) + || GTK_WIDGET_VISIBLE (browser->navigationbar) + ? (void*)0xdeadbeef : NULL); #endif } @@ -2860,6 +2865,11 @@ _action_navigationbar_activate (GtkToggleAction* action, if (browser->settings) g_object_set (browser->settings, "show-navigationbar", active, NULL); sokoke_widget_set_visible (browser->navigationbar, active); + + g_object_set_data (G_OBJECT (browser), "midori-toolbars-visible", + GTK_WIDGET_VISIBLE (browser->menubar) + || GTK_WIDGET_VISIBLE (browser->navigationbar) + ? (void*)0xdeadbeef : NULL); } static void diff --git a/midori/midori-view.c b/midori/midori-view.c index 3404dc4b..942f9d78 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1814,6 +1814,13 @@ webkit_web_view_populate_popup_cb (WebKitWebView* web_view, G_CALLBACK (midori_web_view_menu_inspect_page_activate_cb), widget); */ #endif + if (!g_object_get_data (G_OBJECT (browser), "midori-toolbars-visible")) + { + menuitem = sokoke_action_create_popup_menu_item ( + gtk_action_group_get_action (actions, "Menubar")); + gtk_menu_shell_append (menu_shell, menuitem); + } + menuitem = sokoke_action_create_popup_menu_item ( gtk_action_group_get_action (actions, "ZoomIn")); gtk_menu_shell_append (menu_shell, menuitem);