From 311e30bbfe60f8ecc3a3286afbf18f4a70772019 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 29 Aug 2008 02:29:48 +0200 Subject: [PATCH] Focus the web view when middle click pasting w/o Ctrl --- midori/midori-webview.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/midori/midori-webview.c b/midori/midori-webview.c index d28a83f0..7f920da5 100644 --- a/midori/midori-webview.c +++ b/midori/midori-webview.c @@ -21,7 +21,7 @@ #include "compat.h" #if HAVE_GIO -#include + #include #endif #include #include @@ -472,8 +472,8 @@ gjs_value_links_foreach_cb (GjsValue* link, MidoriWebView* web_view) { const gchar* type; - const gchar* rel; #if HAVE_GIO + const gchar* rel; GFile* icon_file; GIcon* icon; #endif @@ -601,7 +601,10 @@ gtk_widget_button_press_event_after (MidoriWebView* web_view, if (state & GDK_CONTROL_MASK) g_signal_emit (web_view, signals[NEW_TAB], 0, new_uri); else + { g_object_set (web_view, "uri", new_uri, NULL); + gtk_widget_grab_focus (GTK_WIDGET (web_view)); + } g_free (new_uri); g_free (uri); return TRUE;