[gnome-clocks] Do not use the "go" css class when insensitive



commit d2d2a3a1a3311c956ebd9592a7d86a51b03ab856
Author: Paolo Borelli <pborelli gnome org>
Date:   Tue Feb 19 23:16:32 2013 +0100

    Do not use the "go" css class when insensitive

 src/timer.ui   |    1 -
 src/timer.vala |    8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/timer.ui b/src/timer.ui
index 3590238..ae26f83 100644
--- a/src/timer.ui
+++ b/src/timer.ui
@@ -149,7 +149,6 @@
         <property name="can_focus">True</property>
         <property name="receives_default">True</property>
         <style>
-          <class name="clocks-go"/>
           <class name="clocks-button"/>
         </style>
       </object>
diff --git a/src/timer.vala b/src/timer.vala
index a97b9c9..af451c3 100644
--- a/src/timer.vala
+++ b/src/timer.vala
@@ -123,7 +123,13 @@ public class MainPanel : Gd.Stack, Clocks.Clock {
         var m = m_spinbutton.get_value_as_int ();
         var s = s_spinbutton.get_value_as_int ();
 
-        start_button.set_sensitive (h != 0 || m != 0 || s != 0);
+        if (h != 0 || m != 0 || s != 0) {
+            start_button.set_sensitive (true);
+            start_button.get_style_context ().add_class ("clocks-go");
+        } else {
+            start_button.set_sensitive (false);
+            start_button.get_style_context ().remove_class ("clocks-go");
+        }
     }
 
     private void reset () {


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