]> spindle.queued.net Git - midori/commitdiff
If there's no statusbar, force location visibile for progress
authorChristian Dywan <christian@twotoasts.de>
Thu, 11 Sep 2008 00:14:53 +0000 (02:14 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 11 Sep 2008 00:14:53 +0000 (02:14 +0200)
The idea is that if you hide the statusbar and the
location you don't usually need it, but progress
is something you are still interested in. So show
the navigationbar during progress changes and hide it
normally otherwise.

midori/midori-browser.c

index 49905f619a11e02c7cd037e4349ea948b334ee42..9828b507024272f004daceccb33ae48fd917aac9 100644 (file)
@@ -277,6 +277,10 @@ _midori_browser_update_interface (MidoriBrowser* browser)
                       "tooltip", _("Reload the current page"),
                       "sensitive", web_view != NULL, NULL);
         gtk_widget_hide (browser->progressbar);
+        if (!GTK_WIDGET_VISIBLE (browser->statusbar))
+            if (!sokoke_object_get_boolean (browser->settings,
+                "show-navigationbar"))
+                gtk_widget_hide (browser->navigationbar);
     }
     else
     {
@@ -286,8 +290,12 @@ _midori_browser_update_interface (MidoriBrowser* browser)
                       "tooltip", _("Stop loading the current page"), NULL);
         gtk_widget_show (browser->progressbar);
         if (!GTK_WIDGET_VISIBLE (browser->statusbar))
+        {
+            if (!GTK_WIDGET_VISIBLE (browser->navigationbar))
+                gtk_widget_show (browser->navigationbar);
             g_object_set (_action_by_name (browser, "Location"), "progress",
                 midori_web_view_get_progress (MIDORI_WEB_VIEW (web_view)), NULL);
+        }
     }
     katze_throbber_set_animated (KATZE_THROBBER (browser->throbber), loading);
 
@@ -2041,7 +2049,8 @@ static void
 _action_location_focus_out (GtkAction*     action,
                             MidoriBrowser* browser)
 {
-    if (!sokoke_object_get_boolean (browser->settings, "show-navigationbar"))
+    if (GTK_WIDGET_VISIBLE (browser->statusbar) &&
+        !sokoke_object_get_boolean (browser->settings, "show-navigationbar"))
         gtk_widget_hide (browser->navigationbar);
 }