aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources/List.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2009-02-11 12:52:48 +0100
committerFelix Domke <tmbinc@elitedvb.net>2009-02-11 12:52:48 +0100
commitbbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b (patch)
treec5945c791698c14723e989449e6b4bfcc275c05d /lib/python/Components/Sources/List.py
parent4f7990ff2a55874b9eb65e3c9cd47dacb9f76deb (diff)
parent5e6f814d005a01caa437a532e61f4b338617ff67 (diff)
downloadenigma2-bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b.tar.gz
enigma2-bbfcb7ea1f040d030277e2b6f2efa9ea0967bf2b.zip
Merge branch 'master' of /home/tmbinc/enigma2-git into tmbinc/FixTimingBugs
Conflicts: lib/dvb/decoder.cpp
Diffstat (limited to 'lib/python/Components/Sources/List.py')
-rw-r--r--lib/python/Components/Sources/List.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/python/Components/Sources/List.py b/lib/python/Components/Sources/List.py
index ef9c1c89..23b53957 100644
--- a/lib/python/Components/Sources/List.py
+++ b/lib/python/Components/Sources/List.py
@@ -17,6 +17,7 @@ to generate HTML."""
self.fonts = fonts
self.disable_callbacks = False
self.enableWrapAround = enableWrapAround
+ self.__style = "default" # style might be an optional string which can be used to define different visualisations in the skin
def setList(self, list):
self.__list = list
@@ -27,7 +28,11 @@ to generate HTML."""
def entry_changed(self, index):
if not self.disable_callbacks:
self.downstream_elements.entry_changed(self, index)
-
+
+ def modifyEntry(self, index, data):
+ self.__list[index] = data
+ self.entry_changed(index)
+
def count(self):
return len(self.__list)
@@ -76,17 +81,21 @@ to generate HTML."""
self.index -= 1
self.setIndex(self.index)
+ @cached
+ def getStyle(self):
+ return self.__style
+
+ def setStyle(self, style):
+ self.__style = style
+ self.changed((self.CHANGED_SPECIFIC, "style"))
+
+ style = property(getStyle, setStyle)
+
def updateList(self, list):
"""Changes the list without changing the selection or emitting changed Events"""
assert len(list) == len(self.__list)
- print "get old index"
old_index = self.index
- print "disable callback"
self.disable_callbacks = True
- print "set list"
self.list = list
- print "set index"
self.index = old_index
- print "reenable callbacks"
self.disable_callbacks = False
- print "done"