Focus the web view when opening an URL via the location

This commit is contained in:
Christian Dywan 2008-04-17 01:58:02 +02:00
parent a2aa2e4973
commit fae6058c26
2 changed files with 3 additions and 1 deletions

View file

@ -121,7 +121,7 @@ katze_property_proxy (gpointer object,
if (_hint == g_intern_string ("blurb"))
nick = g_param_spec_get_blurb (pspec);
GtkWidget* widget;
const gchar* string;
gchar* string = NULL;
if (type == G_TYPE_PARAM_BOOLEAN)
{
widget = gtk_check_button_new_with_label (nick);
@ -209,6 +209,7 @@ katze_property_proxy (gpointer object,
}
else
widget = gtk_label_new (nick);
g_free (string);
gtk_widget_set_sensitive (widget, pspec->flags & G_PARAM_WRITABLE);

View file

@ -1036,6 +1036,7 @@ midori_browser_location_key_press_event_cb (GtkWidget* widget,
GtkWidget* web_view = midori_browser_get_current_web_view (browser);
g_object_set (web_view, "uri", new_uri, NULL);
g_free (new_uri);
gtk_widget_grab_focus (web_view);
}
return TRUE;
}