[gnome-clocks] Hide the select button when the view is empty.



commit 46de998ff8e8679d566844c0d5aca3a8338c804a
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Sep 2 21:02:03 2013 +0200

    Hide the select button when the view is empty.

 src/widgets.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/widgets.vala b/src/widgets.vala
index 4ceab7d..0ec36b4 100644
--- a/src/widgets.vala
+++ b/src/widgets.vala
@@ -365,7 +365,7 @@ public class ContentView : Gtk.Bin {
         select_button.set_image (select_button_image);
         select_button.valign = Gtk.Align.CENTER;
         select_button.no_show_all = true;
-        bind_property ("empty", select_button, "sensitive", BindingFlags.SYNC_CREATE | 
BindingFlags.INVERT_BOOLEAN);
+        bind_property ("empty", select_button, "visible", BindingFlags.SYNC_CREATE | 
BindingFlags.INVERT_BOOLEAN);
         select_button.clicked.connect (() => {
             icon_view.mode = IconView.Mode.SELECTION;
         });
@@ -566,7 +566,7 @@ public class ContentView : Gtk.Bin {
             cancel_button.show ();
             break;
         case HeaderBar.Mode.NORMAL:
-            select_button.show ();
+            select_button.visible = !empty;
             break;
         }
     }


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