projects
/
vuplus_dvbapp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup some imports
[vuplus_dvbapp]
/
lib
/
python
/
Components
/
ConditionalWidget.py
diff --git
a/lib/python/Components/ConditionalWidget.py
b/lib/python/Components/ConditionalWidget.py
index
62daf5e
..
f826c29
100644
(file)
--- a/
lib/python/Components/ConditionalWidget.py
+++ b/
lib/python/Components/ConditionalWidget.py
@@
-1,7
+1,5
@@
-import skin
-from GUIComponent import *
-
-from enigma import *
+from GUIComponent import GUIComponent
+from enigma import eTimer
class ConditionalWidget(GUIComponent):
def __init__(self, withTimer = True):
class ConditionalWidget(GUIComponent):
def __init__(self, withTimer = True):
@@
-18,10
+16,10
@@
class ConditionalWidget(GUIComponent):
self.conditionalFunction = conditionalFunction
def activateCondition(self, condition):
self.conditionalFunction = conditionalFunction
def activateCondition(self, condition):
- if
(condition)
:
- self.
state = self.HIDDEN
+ if
condition
:
+ self.
visible = 1
else:
else:
- self.
state = self.SHOWN
+ self.
visible = 0
def update(self):
if (self.conditionalFunction != None):
def update(self):
if (self.conditionalFunction != None):
@@
-50,10
+48,7
@@
class BlinkingWidget(GUIComponent):
def blink(self):
if self.blinking == True:
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
def startBlinking(self):
self.blinking = True
@@
-61,10
+56,10
@@
class BlinkingWidget(GUIComponent):
def stopBlinking(self):
self.blinking = False
def stopBlinking(self):
self.blinking = False
- if self.
state == self.SHOWN
:
+ if self.
visible
:
self.hide()
self.timer.stop()
self.hide()
self.timer.stop()
-
+
class BlinkingWidgetConditional(BlinkingWidget, ConditionalWidget):
def __init__(self):
BlinkingWidget.__init__(self)
class BlinkingWidgetConditional(BlinkingWidget, ConditionalWidget):
def __init__(self):
BlinkingWidget.__init__(self)