[nautilus/wip/csoriano/destktop-split2] toolbar: use widget visibility instead of desktop special casing
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/destktop-split2] toolbar: use widget visibility instead of desktop special casing
- Date: Thu, 31 Mar 2016 16:27:55 +0000 (UTC)
commit d14725383f4a4a0a3f65c87867ea08de0fa58be7
Author: Carlos Soriano <csoriano gnome org>
Date: Thu Mar 31 15:36:44 2016 +0200
toolbar: use widget visibility instead of desktop special casing
We need to avoid showing the operations popover in the desktop, or
basically in any window that has the disable-chrome property set.
We can check inside the toolbar if the toolbar itself is hidden in order
to know whether it makes sense to show the operations popover.
In this way we don't relay in special casing subclasses of the window.
src/nautilus-toolbar.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index b968aed..7cee675 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -31,7 +31,6 @@
#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 +600,11 @@ update_operations (NautilusToolbar *self)
TRUE);
gtk_widget_queue_draw (self->priv->operations_icon);
- /* Show the popover at start to increase visibility */
- if (!NAUTILUS_IS_DESKTOP_WINDOW (self->priv->window)) {
+ /* Show the popover at start to increase visibility.
+ * Check whether the toolbar is visible or not before showing the
+ * popover. This can happens if the window has the disables-chrome
+ * property set. */
+ if (gtk_widget_get_visible (GTK_WIDGET (self))) {
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]