From 819dfd8d7773e6fd44fe5d9d522e83b53d35ca0e Mon Sep 17 00:00:00 2001 From: Alexander Hesse Date: Tue, 11 Nov 2008 22:12:26 +0100 Subject: [PATCH] Open links in new tabs using Control and Left mouse button --- AUTHORS | 1 + midori/midori-view.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 9cf55fc2..bad50956 100644 --- a/AUTHORS +++ b/AUTHORS @@ -10,6 +10,7 @@ Contributors: Arnaud Renevier Dale Whittaker Anders F Björklund + Alexander Hesse Graphics: extension: Nancy Runge diff --git a/midori/midori-view.c b/midori/midori-view.c index b88a138f..0ea72c26 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -691,7 +691,21 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, case 1: if (!link_uri) return FALSE; - if (state & GDK_SHIFT_MASK) + #ifdef HAVE_OSX + /* FIXME: Test for Command key */ + if (0) + #else + if (state & GDK_CONTROL_MASK) + #endif + { + /* Open link in new tab */ + background = view->open_tabs_in_the_background; + if (state & GDK_SHIFT_MASK) + g_signal_emit_by_name (view, "new-tab", link_uri, background); + else g_signal_emit_by_name (view, "new-tab", link_uri, !background); + return TRUE; + } + else if (state & GDK_SHIFT_MASK) { /* Open link in new window */ g_signal_emit_by_name (view, "new-window", link_uri); -- 2.39.5