Only middle click search if the selection contains :// or Alt

Accidentally searching is annoying. Presumably when a proper
address is selected it was intentional.
This commit is contained in:
Christian Dywan 2010-03-03 00:31:35 +01:00
parent 3583a07056
commit 044f1f96fb

View file

@ -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;