git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
permit also to record from service groups (services with associated alternative services)
[enigma2.git]
/
lib
/
python
/
Components
/
Sources
/
List.py
diff --git
a/lib/python/Components/Sources/List.py
b/lib/python/Components/Sources/List.py
index ef9c1c8960e9c9d0a37e828b619612e449fc7f56..6f0670a1f6f059d8485d0c0016c8a79847ce7cd8 100644
(file)
--- 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.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
def setList(self, list):
self.__list = list
@@
-26,8
+27,12
@@
to generate HTML."""
def entry_changed(self, index):
if not self.disable_callbacks:
def entry_changed(self, index):
if not self.disable_callbacks:
- self.downstream_elements.entry_changed(self, index)
-
+ self.downstream_elements.entry_changed(index)
+
+ def modifyEntry(self, index, data):
+ self.__list[index] = data
+ self.entry_changed(index)
+
def count(self):
return len(self.__list)
def count(self):
return len(self.__list)
@@
-35,6
+40,11
@@
to generate HTML."""
if self.disable_callbacks:
return
if self.disable_callbacks:
return
+ # update all non-master targets
+ for x in self.downstream_elements:
+ if x is not self.master:
+ x.index = index
+
for x in self.onSelectionChanged:
x()
for x in self.onSelectionChanged:
x()
@@
-76,17
+86,22
@@
to generate HTML."""
self.index -= 1
self.setIndex(self.index)
self.index -= 1
self.setIndex(self.index)
+ @cached
+ def getStyle(self):
+ return self.__style
+
+ def setStyle(self, style):
+ if self.__style != 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)
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
old_index = self.index
- print "disable callback"
self.disable_callbacks = True
self.disable_callbacks = True
- print "set list"
self.list = list
self.list = list
- print "set index"
self.index = old_index
self.index = old_index
- print "reenable callbacks"
self.disable_callbacks = False
self.disable_callbacks = False
- print "done"