]> spindle.queued.net Git - midori/commitdiff
Focus the web view when opening an URL via the location
authorChristian Dywan <christian@twotoasts.de>
Wed, 16 Apr 2008 23:58:02 +0000 (01:58 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 16 Apr 2008 23:58:02 +0000 (01:58 +0200)
katze/katze-utils.c
src/midori-browser.c

index ee8d41fd6e0490e3729d49d97bc2ab27a14a8617..ec8c5fc7aad9ecc4ae493a291a2c7e3835e95e6f 100644 (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);
 
index 5bf771d31578735bb52843b9eda160f1acb10a8c..fcb27dec8d67852c7cc8244e7c7f2eb531216ffd 100644 (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;
     }