git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some ipkg changes.. (done by ritzmo)
[enigma2.git]
/
lib
/
python
/
Components
/
Converter
/
ConditionalShowHide.py
diff --git
a/lib/python/Components/Converter/ConditionalShowHide.py
b/lib/python/Components/Converter/ConditionalShowHide.py
index cc98288f57334884c0ef73e458ef56801258944a..2d4b99a228d0b28744d43e59e9efaae65a203e2e 100644
(file)
--- a/
lib/python/Components/Converter/ConditionalShowHide.py
+++ b/
lib/python/Components/Converter/ConditionalShowHide.py
@@
-1,11
+1,22
@@
from Converter import Converter
class ConditionalShowHide(Converter, object):
from Converter import Converter
class ConditionalShowHide(Converter, object):
-
def __init__(self, type):
Converter.__init__(self, type)
self.invert = type == "Invert"
def __init__(self, type):
Converter.__init__(self, type)
self.invert = type == "Invert"
+ def calcVisibility(self):
+ b = self.source.boolean
+ if b is None:
+ return True
+ b ^= self.invert
+ return b
+
def changed(self, what):
def changed(self, what):
+ vis = self.calcVisibility()
for x in self.downstream_elements:
for x in self.downstream_elements:
- x.visible = self.source.boolean
+ x.visible = vis
+
+ def connectDownstream(self, downstream):
+ Converter.connectDownstream(self, downstream)
+ downstream.visible = self.calcVisibility()