1 from HTMLComponent import HTMLComponent
2 from GUIComponent import GUIComponent
4 from MenuList import MenuList
6 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
7 from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
9 from enigma import loadPNG, eListboxPythonMultiContent, eListbox, gFont
11 def PluginEntryComponent(plugin):
14 res.append(MultiContentEntryText(pos=(120, 5), size=(320, 25), font=0, text=plugin.name))
15 res.append(MultiContentEntryText(pos=(120, 26), size=(320, 17), font=1, text=plugin.description))
17 if plugin.icon is None:
18 png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "plugin.png"))
21 res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 5), size=(100, 40), png = png))
25 def PluginCategoryComponent(name, png):
28 res.append(MultiContentEntryText(pos=(120, 5), size=(320, 25), font=0, text=name))
29 res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 0), size=(100, 50), png = png))
33 def PluginDownloadComponent(plugin, name):
36 res.append(MultiContentEntryText(pos=(120, 5), size=(320, 25), font=0, text=name))
37 res.append(MultiContentEntryText(pos=(120, 26), size=(320, 17), font=1, text=plugin.description))
39 if plugin.icon is None:
40 png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "plugin.png"))
43 res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 0), size=(100, 50), png = png))
47 class PluginList(MenuList, HTMLComponent, GUIComponent):
48 def __init__(self, list):
49 GUIComponent.__init__(self)
50 self.l = eListboxPythonMultiContent()
53 self.l.setFont(0, gFont("Regular", 20))
54 self.l.setFont(1, gFont("Regular", 14))
55 self.l.setItemHeight(50)
59 def postWidgetCreate(self, instance):
60 instance.setContent(self.l)