Block button when freewheel mode is set by side application / utility.
authorNikita Zlobin <cook60020tmp@mail.ru>
Mon, 27 Dec 2010 08:18:56 +0000 (27 13:18 +0500)
committerNikita Zlobin <cook60020tmp@mail.ru>
Mon, 27 Dec 2010 08:18:56 +0000 (27 13:18 +0500)
jacktimectl

index c4c26eb..693a03f 100644 (file)
@@ -16,11 +16,14 @@ def on_button_toggled(button):
     jack.set_freewheel(1)
   else:
     button.set_label(text_generic+text_rtwheel)
+    button.set_sensitive(True)
     jack.set_freewheel(0)
 
 def timeout():
   if jack.get_freewheel() > 0:
-    button.set_active(True)
+    if button.get_active() == False:
+      button.set_active(True)
+      button.set_sensitive(False)
   else:
     button.set_active(False)