Updating branch refs/heads/master
         to 9fe116255bfed567629c82cd383fa2207098387c (commit)
       from 13716548a4a3561d9283b699ef62ef53ebbf3822 (commit)

commit 9fe116255bfed567629c82cd383fa2207098387c
Author: Stephan Arts <step...@xfce.org>
Date:   Mon Oct 17 15:25:53 2011 +0200

    Improve fullscreen-behaviour
    
    - Do not make the nav-toolbar visible when switching images
    - Honor the hide-thumbnailbar property when opening a new image
      while fullscreen.

 src/main_window.c |   90 ++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 62 insertions(+), 28 deletions(-)

diff --git a/src/main_window.c b/src/main_window.c
index 3b49d03..2b99f1f 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -1067,7 +1067,24 @@ rstto_main_window_update_buttons (RsttoMainWindow 
*window)
         case 1: 
             if (rstto_settings_get_boolean_property 
(window->priv->settings_manager, "show-thumbnailbar"))
             {
-                gtk_widget_show (window->priv->thumbnailbar);
+                if ( 0 == (gdk_window_get_state (GTK_WIDGET (window)->window) 
& GDK_WINDOW_STATE_FULLSCREEN ))
+                {
+                    gtk_widget_show (window->priv->thumbnailbar);
+                }
+                else
+                {
+                    if (rstto_settings_get_boolean_property (
+                            window->priv->settings_manager,
+                            "hide-thumbnailbar-fullscreen"))
+                    {
+                        gtk_widget_hide (window->priv->thumbnailbar);
+                    }
+                    else
+                    {
+                        gtk_widget_show (window->priv->thumbnailbar);
+                    }
+                
+                }
             }
             gtk_widget_set_sensitive ( gtk_ui_manager_get_widget ( 
window->priv->ui_manager, "/main-menu/file-menu/save-copy"), TRUE);
             /*
@@ -1173,7 +1190,24 @@ rstto_main_window_update_buttons (RsttoMainWindow 
*window)
         default: 
             if (rstto_settings_get_boolean_property 
(window->priv->settings_manager, "show-thumbnailbar"))
             {
-                gtk_widget_show (window->priv->thumbnailbar);
+                if ( 0 == (gdk_window_get_state (GTK_WIDGET (window)->window) 
& GDK_WINDOW_STATE_FULLSCREEN ))
+                {
+                    gtk_widget_show (window->priv->thumbnailbar);
+                }
+                else
+                {
+                    if (rstto_settings_get_boolean_property (
+                            window->priv->settings_manager,
+                            "hide-thumbnailbar-fullscreen"))
+                    {
+                        gtk_widget_hide (window->priv->thumbnailbar);
+                    }
+                    else
+                    {
+                        gtk_widget_show (window->priv->thumbnailbar);
+                    }
+                
+                }
             }
             gtk_widget_set_sensitive ( gtk_ui_manager_get_widget ( 
window->priv->ui_manager, "/main-menu/file-menu/save-copy"), TRUE);
             /*
@@ -1343,43 +1377,43 @@ rstto_main_window_update_buttons (RsttoMainWindow 
*window)
             gtk_ui_manager_get_widget (
                     window->priv->ui_manager,
                     "/main-menu/view-menu/show-nav-toolbar"));
-
-        if (rstto_settings_get_boolean_property (
-                window->priv->settings_manager,
-                "show-file-toolbar") )
+        if ( GTK_WIDGET_VISIBLE (window) )
         {
-            if ( GTK_WIDGET_VISIBLE (window) )
-            {
-                /* Do not make the widget visible when in
-                 * fullscreen mode.
-                 */
-                if ( 0 == (gdk_window_get_state (GTK_WIDGET
+            /* Do not make the widget visible when in
+             * fullscreen mode.
+             */
+            if ( 0 == (gdk_window_get_state (GTK_WIDGET
 (window)->window) & GDK_WINDOW_STATE_FULLSCREEN ))
+            {
+                if (rstto_settings_get_boolean_property (
+                        window->priv->settings_manager,
+                        "show-file-toolbar") )
                 {
                     gtk_widget_show (
                         gtk_ui_manager_get_widget (
                                 window->priv->ui_manager,
                                 "/file-toolbar"));
                 }
+                else
+                {
+                    gtk_widget_hide (
+                        gtk_ui_manager_get_widget (
+                                window->priv->ui_manager,
+                                "/file-toolbar"));
+
+                }
+                if (rstto_settings_get_boolean_property (
+                        window->priv->settings_manager,
+                        "show-nav-toolbar") )
+                {
+                    gtk_widget_show (
+                        gtk_ui_manager_get_widget (
+                                window->priv->ui_manager,
+                                "/navigation-toolbar"));
+                }
             }
         }
-        else
-        {
-            gtk_widget_hide (
-                gtk_ui_manager_get_widget (
-                        window->priv->ui_manager,
-                        "/file-toolbar"));
 
-        }
-        if (rstto_settings_get_boolean_property (
-                window->priv->settings_manager,
-                "show-nav-toolbar") )
-        {
-            gtk_widget_show (
-                gtk_ui_manager_get_widget (
-                        window->priv->ui_manager,
-                        "/navigation-toolbar"));
-        }
 
         /* Hide buttons */
         gtk_widget_hide (
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to