]> spindle.queued.net Git - midori/commitdiff
Do not put statusbar text in the location entry if it's focussed
authorChristian Dywan <christian@twotoasts.de>
Sat, 19 Sep 2009 19:06:33 +0000 (21:06 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 19 Sep 2009 19:06:33 +0000 (21:06 +0200)
This prevents overwriting what the user may be typing while
accidentally moving the mouse.

midori/midori-browser.c

index e4d3faffe11839c974b646bd38e6cc4ab7a124ba..720b18ba9fc4dc65facd33193cda7c746b039fd5 100644 (file)
@@ -352,9 +352,13 @@ static void
 _midori_browser_set_statusbar_text (MidoriBrowser* browser,
                                     const gchar*   text)
 {
+    GtkWidget* widget = gtk_window_get_focus (GTK_WINDOW (browser));
+    gboolean is_location = widget ?
+        MIDORI_IS_LOCATION_ENTRY (gtk_widget_get_parent (widget)) : FALSE;
+
     katze_assign (browser->statusbar_text, g_strdup (text));
 
-    if (!GTK_WIDGET_VISIBLE (browser->statusbar))
+    if (!GTK_WIDGET_VISIBLE (browser->statusbar) && !is_location)
     {
         GtkAction* action = _action_by_name (browser, "Location");
         MidoriLocationAction* location_action = MIDORI_LOCATION_ACTION (action);