[gnome-clocks] Explicitely clear the ACTIVE flag in toolbuttons



commit f0497acbf48de804f157e8b52ed8d10da9f22d35
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Nov 17 15:31:51 2012 +0100

    Explicitely clear the ACTIVE flag in toolbuttons
    
    Work around gtk problem https://bugzilla.gnome.org/show_bug.cgi?id=688519

 gnomeclocks/app.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnomeclocks/app.py b/gnomeclocks/app.py
index 67806ed..2fc20c7 100644
--- a/gnomeclocks/app.py
+++ b/gnomeclocks/app.py
@@ -178,7 +178,11 @@ class ClockButton(Gtk.RadioButton):
 
     def do_toggled(self):
         try:
-            self.remove(self.get_child())
+            label = self.get_child()
+            self.remove(label)
+            # We need to unset the flag manually until GTK fixes
+            # https://bugzilla.gnome.org/show_bug.cgi?id=688519
+            label.unset_state_flags (Gtk.StateFlags.ACTIVE)
             if self.get_active():
                 self.add(self.bold_label)
             else:



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