aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources/Boolean.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-06-26 21:10:10 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-06-26 21:10:10 +0000
commit77bb53beb46f6984e1529c4f703523c146956d0f (patch)
tree5f6d1c9e9be93e3fe9e9f9d3ac8f896434d7d2c7 /lib/python/Components/Sources/Boolean.py
parentd279cc40f4a1d927ad00bfe7b0ee3a303e9aed44 (diff)
downloadenigma2-77bb53beb46f6984e1529c4f703523c146956d0f.tar.gz
enigma2-77bb53beb46f6984e1529c4f703523c146956d0f.zip
add Boolean source, add ServiceInfo boolean sources, add ConditionalShowHide converter, add FixedLabel and Pixmap renderer
Diffstat (limited to 'lib/python/Components/Sources/Boolean.py')
-rw-r--r--lib/python/Components/Sources/Boolean.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/python/Components/Sources/Boolean.py b/lib/python/Components/Sources/Boolean.py
new file mode 100644
index 00000000..c25b4626
--- /dev/null
+++ b/lib/python/Components/Sources/Boolean.py
@@ -0,0 +1,25 @@
+from Source import Source
+from enigma import eTimer
+
+# a small warning:
+# you can use that boolean well to express screen-private
+# conditional expressions.
+#
+# however, if you think that there is ANY interest that another
+# screen could use your expression, please put your calculation
+# into a seperate Source, providing a "boolean"-property.
+class Boolean(Source, object):
+ def __init__(self, fixed = False, function = None, poll = 0):
+ Source.__init__(self)
+ if poll > 0:
+ self.poll_timer = eTimer()
+ self.poll_timer.timeout.get().append(self.changed)
+ self.poll_timer.start(poll)
+
+ def getBoolean(self):
+ if self.function is not None:
+ return self.function()
+ else:
+ return self.fixed
+
+ boolean = property(getBoolean)