1 from Components.HTMLComponent import *
2 from Components.GUIComponent import *
3 from Screen import Screen
4 from Components.ActionMap import ActionMap
5 from Components.Label import Label
6 from Components.MenuList import MenuList
7 from ServiceReference import ServiceReference
8 from enigma import eListboxPythonMultiContent, eListbox, gFont
12 def ServiceInfoListEntry(a, b):
15 #PyObject *px, *py, *pwidth, *pheight, *pfnt, *pstring, *pflags;
16 res.append((0, 0, 200, 30, 0, RT_HALIGN_LEFT, ""))
17 res.append((0, 0, 150, 25, 0, RT_HALIGN_LEFT, a))
18 res.append((170, 0, 150, 25, 0, RT_HALIGN_LEFT, b))
22 class ServiceInfoList(HTMLComponent, GUIComponent):
23 def __init__(self, source):
24 GUIComponent.__init__(self)
25 self.l = eListboxPythonMultiContent()
27 self.l.setList(self.list)
28 self.l.setFont(0, gFont("Arial", 23))
30 def GUIcreate(self, parent):
31 self.instance = eListbox(parent)
32 self.instance.setContent(self.l)
33 self.instance.setItemHeight(25)
36 self.instance.setContent(None)
39 class ServiceInfo(Screen):
40 def __init__(self, session):
41 Screen.__init__(self, session)
43 self["actions"] = ActionMap(["OkCancelActions"],
49 Labels = ( ("Name", "ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()"),
66 value = str(eval(item[1]))
69 tlist.append(ServiceInfoListEntry(item[0]+":", value))
71 self["infolist"] = ServiceInfoList(tlist)