[nautilus] toolbar: don't show operations popover in desktop



commit 3e9238db20285605904d9ae2846bbb37561f3693
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Feb 4 15:42:52 2016 +0100

    toolbar: don't show operations popover in desktop
    
    We needed a check there to not show it if the window is the desktop one.
    
    Also this fixes the operations button not being hidden again due to
    the desktop window popover being shown.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761551

 src/nautilus-toolbar.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 12c0899..189e4f5 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -31,6 +31,7 @@
 #include "nautilus-window.h"
 #include "nautilus-progress-info-widget.h"
 #include "nautilus-application.h"
+#include "nautilus-desktop-window.h"
 
 #include <libnautilus-private/nautilus-global-preferences.h>
 #include <libnautilus-private/nautilus-ui-utilities.h>
@@ -601,8 +602,10 @@ update_operations (NautilusToolbar *self)
                 gtk_widget_queue_draw (self->priv->operations_icon);
 
                 /* Show the popover at start to increase visibility */
-                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->operations_button),
-                                              TRUE);
+                if (!NAUTILUS_IS_DESKTOP_WINDOW (self->priv->window)) {
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->priv->operations_button),
+                                                      TRUE);
+                }
         }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]