diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/ConditionalWidget.py | 5 | ||||
| -rw-r--r-- | lib/python/Components/Label.py | 7 | ||||
| -rw-r--r-- | lib/python/Components/Pixmap.py | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/python/Components/ConditionalWidget.py b/lib/python/Components/ConditionalWidget.py index 5ff77980..eec5b436 100644 --- a/lib/python/Components/ConditionalWidget.py +++ b/lib/python/Components/ConditionalWidget.py @@ -31,9 +31,6 @@ class Widget(GUIComponent): self.state = self.HIDDEN self.instance.hide() - def removeWidget(self, instance): - pass - class ConditionalWidget(Widget): def __init__(self, withTimer = True): Widget.__init__(self) @@ -51,9 +48,11 @@ class ConditionalWidget(Widget): def activateCondition(self, condition): if (condition): if (self.state == self.HIDDEN): + print "update: " + str(self) + " SHOW" self.showWidget() else: if (self.state == self.SHOWN): + print "update: " + str(self) + " HIDE" self.hideWidget() def update(self): diff --git a/lib/python/Components/Label.py b/lib/python/Components/Label.py index c2d57743..c4efcda4 100644 --- a/lib/python/Components/Label.py +++ b/lib/python/Components/Label.py @@ -2,6 +2,8 @@ from HTMLComponent import * from GUIComponent import * from VariableText import * +from ConditionalWidget import * + from enigma import eLabel class Label(HTMLComponent, GUIComponent, VariableText): @@ -27,3 +29,8 @@ class Label(HTMLComponent, GUIComponent, VariableText): def hide(self): self.instance.hide() + +class LabelConditional(ConditionalWidget, Label): + def __init__(self, text = "", withTimer = True): + ConditionalWidget.__init__(self, withTimer = withTimer) + Label.__init__(self, text = text)
\ No newline at end of file diff --git a/lib/python/Components/Pixmap.py b/lib/python/Components/Pixmap.py index 79026118..2a54ea98 100644 --- a/lib/python/Components/Pixmap.py +++ b/lib/python/Components/Pixmap.py @@ -20,4 +20,5 @@ class Pixmap(Widget): class PixmapConditional(ConditionalWidget, Pixmap): def __init__(self, withTimer = True): ConditionalWidget.__init__(self) + Pixmap.__init__(self) |
