X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e7333dd176c36f58f033a872b217ffc0d6244224..8ef98e5273d9778bd7c53b5ea30de3e1c5d0165e:/lib/python/Screens/ServiceInfo.py diff --git a/lib/python/Screens/ServiceInfo.py b/lib/python/Screens/ServiceInfo.py index f57c1cdd..10f7b28c 100644 --- a/lib/python/Screens/ServiceInfo.py +++ b/lib/python/Screens/ServiceInfo.py @@ -1,8 +1,40 @@ +from Components.HTMLComponent import * +from Components.GUIComponent import * from Screen import Screen from Components.ActionMap import ActionMap from Components.Label import Label from Components.MenuList import MenuList from ServiceReference import ServiceReference +from enigma import eListboxPythonMultiContent, eListbox, gFont + +RT_HALIGN_LEFT = 0 + +def ServiceInfoListEntry(a, b): + res = [ ] + + #PyObject *px, *py, *pwidth, *pheight, *pfnt, *pstring, *pflags; + res.append((0, 0, 200, 30, 0, RT_HALIGN_LEFT, "")) + res.append((0, 0, 150, 25, 0, RT_HALIGN_LEFT, a)) + res.append((170, 0, 150, 25, 0, RT_HALIGN_LEFT, b)) + + return res + +class ServiceInfoList(HTMLComponent, GUIComponent): + def __init__(self, source): + GUIComponent.__init__(self) + self.l = eListboxPythonMultiContent() + self.list = source + self.l.setList(self.list) + self.l.setFont(0, gFont("Arial", 23)) + + def GUIcreate(self, parent): + self.instance = eListbox(parent) + self.instance.setContent(self.l) + self.instance.setItemHeight(25) + + def GUIdelete(self): + self.instance.setContent(None) + self.instance = None class ServiceInfo(Screen): def __init__(self, session): @@ -34,6 +66,6 @@ class ServiceInfo(Screen): value = str(eval(item[1])) except: value = "N/A" - tlist.append((item[0] + ": " + value,0)) - - self["infolist"] = MenuList(tlist) + tlist.append(ServiceInfoListEntry(item[0]+":", value)) + + self["infolist"] = ServiceInfoList(tlist)