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 fixes on the subservices quickzapper
[enigma2.git]
/
lib
/
python
/
Components
/
Converter
/
StringList.py
diff --git
a/lib/python/Components/Converter/StringList.py
b/lib/python/Components/Converter/StringList.py
index 31dbcd3c9ae1b21cb54dfd4ec5fec7339b7593dd..1304c6430bf19be16934538008e7a86bc8ab8640 100644
(file)
--- a/
lib/python/Components/Converter/StringList.py
+++ b/
lib/python/Components/Converter/StringList.py
@@
-1,25
+1,26
@@
from Converter import Converter
from enigma import eListboxPythonStringContent
from Converter import Converter
from enigma import eListboxPythonStringContent
-
+from Components.Element import cached
class StringList(Converter):
"""Turns a simple python list into a list which can be used in a listbox."""
class StringList(Converter):
"""Turns a simple python list into a list which can be used in a listbox."""
- def __init__(self,
*args, **kwargs
):
- Converter.__init__(self)
+ def __init__(self,
type
):
+ Converter.__init__(self
, type
)
- def changed(self):
+ def changed(self
, what
):
self.content = eListboxPythonStringContent()
if self.source:
self.content.setList(self.source.list)
self.content = eListboxPythonStringContent()
if self.source:
self.content.setList(self.source.list)
- self.downstream_elements.changed()
+ self.downstream_elements.changed(
what
)
def selectionChanged(self, index):
def selectionChanged(self, index):
- self.
upstream_elements
.selectionChanged(index)
+ self.
source
.selectionChanged(index)
# update all non-master targets
for x in self.downstream_elements:
if x is not self.master:
x.index = index
# update all non-master targets
for x in self.downstream_elements:
if x is not self.master:
x.index = index
+ @cached
def getCurrent(self):
if self.source is None:
return None
def getCurrent(self):
if self.source is None:
return None
@@
-28,6
+29,7
@@
class StringList(Converter):
current = property(getCurrent)
# pass through: getIndex / setIndex to master
current = property(getCurrent)
# pass through: getIndex / setIndex to master
+ @cached
def getIndex(self):
if self.master is None:
return None
def getIndex(self):
if self.master is None:
return None