From fae6058c262a4051fb9db5ffb00a4e7fb7c71d5c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 17 Apr 2008 01:58:02 +0200 Subject: [PATCH] Focus the web view when opening an URL via the location --- katze/katze-utils.c | 3 ++- src/midori-browser.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/katze/katze-utils.c b/katze/katze-utils.c index ee8d41fd..ec8c5fc7 100644 --- a/katze/katze-utils.c +++ b/katze/katze-utils.c @@ -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); diff --git a/src/midori-browser.c b/src/midori-browser.c index 5bf771d3..fcb27dec 100644 --- a/src/midori-browser.c +++ b/src/midori-browser.c @@ -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; }