From d53ef7c92fdc2763acedd76206ee430efc7165fd Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 17 Oct 2008 23:30:31 +0200 Subject: [PATCH] Show toolbar menu when right-clicking the menubar --- midori/midori-browser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 0329caf9..92a4c9d3 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3260,6 +3260,11 @@ midori_browser_entry_clear_icon_released_cb (GtkIconEntry* entry, gtk_entry_set_text (GTK_ENTRY (entry), ""); } +static gboolean +midori_browser_toolbar_item_button_press_event_cb (GtkWidget* toolitem, + GdkEventButton* event, + MidoriBrowser* browser); + static void midori_browser_init (MidoriBrowser* browser) { @@ -3445,6 +3450,8 @@ midori_browser_init (MidoriBrowser* browser) gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (browser->menu_tools), menuitem); gtk_widget_hide (browser->menubar); + g_signal_connect (browser->menubar, "button-press-event", + G_CALLBACK (midori_browser_toolbar_item_button_press_event_cb), browser); _action_set_sensitive (browser, "SaveAs", FALSE); _action_set_sensitive (browser, "PrivateBrowsing", FALSE);