aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Converter/StaticMultiList.py
blob: d02ff336b83e98c64d03926de8840c78c5d9be50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)