[nautilus] toolbar: don't update style when not needed



commit d8c6ef7efb4c663d142fc346529785ca83344f5d
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Aug 19 23:46:07 2015 +0200

    toolbar: don't update style when not needed
    
    We were updating the operations button style always that
    update_operations was called. Thing is that is not necesary,
    and can cause some anoyances in patchs that are to come.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753728

 src/nautilus-toolbar.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 1fe2f96..7ba2fe0 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -519,8 +519,8 @@ update_operations (NautilusToolbar *self)
          * estimated time is longer than a OPERATION_MINIMUM_TIME is odd, so show
          * it only if the remaining time is bigger than again OPERATION_MINIMUM_TIME.
          */
-        if (total_remaining_time > OPERATION_MINIMUM_TIME ||
-            gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->priv->operations_button))) {
+        if (total_remaining_time > OPERATION_MINIMUM_TIME &&
+            !gtk_revealer_get_reveal_child (GTK_REVEALER (self->priv->operations_revealer))) {
                 gtk_revealer_set_reveal_child (GTK_REVEALER (self->priv->operations_revealer),
                                                TRUE);
                 gtk_widget_queue_draw (self->priv->operations_icon);


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