]> spindle.queued.net Git - midori/commitdiff
Open links in new tabs using Control and Left mouse button
authorAlexander Hesse <alex@phicode.de>
Tue, 11 Nov 2008 21:12:26 +0000 (22:12 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 11 Nov 2008 21:12:26 +0000 (22:12 +0100)
AUTHORS
midori/midori-view.c

diff --git a/AUTHORS b/AUTHORS
index 9cf55fc2714c7f477846b02a46f692c8e3802ef0..bad5095678062c7412d2f1966019b9e884873ed0 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -10,6 +10,7 @@ Contributors:
     Arnaud Renevier <arenevier@fdn.fr>
     Dale Whittaker <dayul@users.sf.net>
     Anders F Björklund <afb@macports.org>
+    Alexander Hesse <alex@phicode.de>
 
 Graphics:
     extension: Nancy Runge <nancy@twotoasts.de>
index b88a138fddaf0a24bdac350f0a7cff96d007cef4..0ea72c26d7ceb34640f3d4013334f79e08e13117 100644 (file)
@@ -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);