aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/ConditionalWidget.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-06-26 19:08:53 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-06-26 19:08:53 +0000
commitd279cc40f4a1d927ad00bfe7b0ee3a303e9aed44 (patch)
treed8654fba3f2d84b0c35fb781d9a977c9ee242c9d /lib/python/Components/ConditionalWidget.py
parent21006e5dadcc191222dd103b163b1bbd9f76c742 (diff)
downloadenigma2-d279cc40f4a1d927ad00bfe7b0ee3a303e9aed44.tar.gz
enigma2-d279cc40f4a1d927ad00bfe7b0ee3a303e9aed44.zip
rename 'state' to 'visible', remove boolean-like constants
Diffstat (limited to 'lib/python/Components/ConditionalWidget.py')
-rw-r--r--lib/python/Components/ConditionalWidget.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/python/Components/ConditionalWidget.py b/lib/python/Components/ConditionalWidget.py
index 7e4304ae..391b8871 100644
--- a/lib/python/Components/ConditionalWidget.py
+++ b/lib/python/Components/ConditionalWidget.py
@@ -19,9 +19,9 @@ class ConditionalWidget(GUIComponent):
def activateCondition(self, condition):
if condition:
- self.state = self.SHOWN
+ self.visible = 1
else:
- self.state = self.HIDDEN
+ self.visible = 0
def update(self):
if (self.conditionalFunction != None):
@@ -50,10 +50,7 @@ class BlinkingWidget(GUIComponent):
def blink(self):
if self.blinking == True:
- if self.state == self.SHOWN:
- self.hide()
- elif self.state == self.HIDDEN:
- self.show()
+ self.visible = not self.visible
def startBlinking(self):
self.blinking = True
@@ -61,7 +58,7 @@ class BlinkingWidget(GUIComponent):
def stopBlinking(self):
self.blinking = False
- if self.state == self.SHOWN:
+ if self.visible:
self.hide()
self.timer.stop()