diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-04-12 19:58:31 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-04-12 19:58:31 +0000 |
| commit | 513a789819efefc582cbabe6a1800f0625605226 (patch) | |
| tree | cdbcf5f071b7594d3abfd63e839707337980744c /lib/python/Components/Converter/StaticMultiList.py | |
| parent | 897c01289c6e24a3cce676f7c200ccb3b2959f94 (diff) | |
| download | enigma2-513a789819efefc582cbabe6a1800f0625605226.tar.gz enigma2-513a789819efefc582cbabe6a1800f0625605226.zip | |
add StaticMultiList for MultiContentList-styled content
Diffstat (limited to 'lib/python/Components/Converter/StaticMultiList.py')
| -rw-r--r-- | lib/python/Components/Converter/StaticMultiList.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/python/Components/Converter/StaticMultiList.py b/lib/python/Components/Converter/StaticMultiList.py new file mode 100644 index 00000000..d02ff336 --- /dev/null +++ b/lib/python/Components/Converter/StaticMultiList.py @@ -0,0 +1,24 @@ +from enigma import eListboxPythonMultiContent +from Components.Converter.StringList import StringList + +class StaticMultiList(StringList): + """Turns a python list in 'multi list format' into a list which can be used in a listbox.""" + def changed(self, what): + if not self.content: + self.content = eListboxPythonMultiContent() + + if self.source: + # setup the required item height, as given by the source. + self.content.setItemHeight(self.source.item_height) + + # also setup fonts (also given by source) + index = 0 + for f in self.source.fonts: + self.content.setFont(index, f) + index += 1 + + if self.source: + self.content.setList(self.source.list) + + print "downstream_elements:", self.downstream_elements + self.downstream_elements.changed(what) |
