fix caching
[enigma2.git] / lib / python / Components / Converter / StringList.py
index d542197684739588f4f488234d849f66c38a840c..1304c6430bf19be16934538008e7a86bc8ab8640 100644 (file)
@@ -1,17 +1,17 @@
 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."""
        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.downstream_elements.changed()
+               self.downstream_elements.changed(what)
 
        def selectionChanged(self, index):
                self.source.selectionChanged(index)
@@ -20,6 +20,7 @@ class StringList(Converter):
                        if x is not self.master:
                                x.index = index
 
+       @cached
        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
+       @cached
        def getIndex(self):
                if self.master is None:
                        return None