]> spindle.queued.net Git - midori/commitdiff
Hide navigationbar in fullscreen but toggle when focussed
authorChristian Dywan <christian@twotoasts.de>
Sun, 8 Nov 2009 21:08:21 +0000 (22:08 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 8 Nov 2009 21:08:21 +0000 (22:08 +0100)
midori/midori-browser.c

index c65bc9c04b052fa316e6aa0bdfc48f5deddc57f4..20f5fe5f84955665126f9c861ec734b96a2978d2 100644 (file)
@@ -3500,7 +3500,7 @@ static void
 _action_location_activate (GtkAction*     action,
                            MidoriBrowser* browser)
 {
-    if (!browser->show_navigationbar)
+    if (!GTK_WIDGET_VISIBLE (browser->navigationbar))
         gtk_widget_show (browser->navigationbar);
 }
 
@@ -3548,7 +3548,9 @@ _action_location_focus_out (GtkAction*     action,
 {
     GtkWidget* view = midori_browser_get_current_tab (browser);
 
-    if (!browser->show_navigationbar)
+    if (!browser->show_navigationbar
+        || gdk_window_get_state (GTK_WIDGET (browser)->window)
+                                 & GDK_WINDOW_STATE_FULLSCREEN)
         gtk_widget_hide (browser->navigationbar);
 
     if (g_object_get_data (G_OBJECT (view), "news-feeds"))
@@ -4894,11 +4896,14 @@ midori_browser_window_state_event_cb (MidoriBrowser*       browser,
         if (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)
         {
             gtk_widget_hide (browser->menubar);
+            gtk_widget_hide (browser->navigationbar);
         }
         else
         {
             if (katze_object_get_boolean (browser->settings, "show-menubar"))
-                gtk_widget_show (browser->menubar);
+                gtk_widget_show (browser->navigationbar);
+            if (katze_object_get_boolean (browser->settings, "show-navigationbar"))
+                gtk_widget_show (browser->navigationbar);
         }
     }
 }