allow setting a boolean value
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 23 Apr 2008 10:24:18 +0000 (10:24 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 23 Apr 2008 10:24:18 +0000 (10:24 +0000)
lib/python/Components/Sources/Boolean.py

index f2526a4..c92027a 100644 (file)
@@ -28,7 +28,12 @@ class Boolean(Source, object):
                else:
                        return self.fixed
 
-       boolean = property(getBoolean)
+       def setBoolean(self, value):
+               assert self.function is None
+               self.fixed = value
+               self.poll()
+
+       boolean = property(getBoolean, setBoolean)
 
        def poll(self):
                self.changed((self.CHANGED_ALL,))