Focus the web view when middle click pasting w/o Ctrl

This commit is contained in:
Christian Dywan 2008-08-29 02:29:48 +02:00
parent b6ae63249b
commit 311e30bbfe

View file

@ -472,8 +472,8 @@ gjs_value_links_foreach_cb (GjsValue* link,
MidoriWebView* web_view) MidoriWebView* web_view)
{ {
const gchar* type; const gchar* type;
const gchar* rel;
#if HAVE_GIO #if HAVE_GIO
const gchar* rel;
GFile* icon_file; GFile* icon_file;
GIcon* icon; GIcon* icon;
#endif #endif
@ -601,7 +601,10 @@ gtk_widget_button_press_event_after (MidoriWebView* web_view,
if (state & GDK_CONTROL_MASK) if (state & GDK_CONTROL_MASK)
g_signal_emit (web_view, signals[NEW_TAB], 0, new_uri); g_signal_emit (web_view, signals[NEW_TAB], 0, new_uri);
else else
{
g_object_set (web_view, "uri", new_uri, NULL); g_object_set (web_view, "uri", new_uri, NULL);
gtk_widget_grab_focus (GTK_WIDGET (web_view));
}
g_free (new_uri); g_free (new_uri);
g_free (uri); g_free (uri);
return TRUE; return TRUE;