From 044f1f96fbf2dad626e5e03d23e377b0036b1a33 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 3 Mar 2010 00:31:35 +0100 Subject: [PATCH] Only middle click search if the selection contains :// or Alt Accidentally searching is annoying. Presumably when a proper address is selected it was intentional. --- midori/midori-view.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index 3bd811ea..917ccb3a 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1324,6 +1324,11 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, } katze_assign (uri, new_uri); } + else if (!strstr (uri, "://")) + { + g_free (uri); + return FALSE; + } if (MIDORI_MOD_NEW_TAB (event->state)) { @@ -1337,8 +1342,8 @@ gtk_widget_button_press_event_cb (WebKitWebView* web_view, midori_view_set_uri (MIDORI_VIEW (view), uri); gtk_widget_grab_focus (GTK_WIDGET (view)); } + g_free (uri); return TRUE; - g_free (uri); } } break; -- 2.39.5