1 from MenuList import MenuList
3 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
4 from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
6 from enigma import eListboxPythonMultiContent, gFont
7 from Tools.LoadPixmap import LoadPixmap
9 def PluginEntryComponent(plugin):
12 res.append(MultiContentEntryText(pos=(120, 5), size=(320, 25), font=0, text=plugin.name))
13 res.append(MultiContentEntryText(pos=(120, 26), size=(320, 17), font=1, text=plugin.description))
15 if plugin.icon is None:
16 png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/plugin.png"))
19 res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 5), size=(100, 40), png = png))
23 def PluginCategoryComponent(name, png):
26 res.append(MultiContentEntryText(pos=(120, 5), size=(320, 25), font=0, text=name))
27 res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 0), size=(100, 50), png = png))
31 def PluginDownloadComponent(plugin, name):
34 res.append(MultiContentEntryText(pos=(120, 5), size=(320, 25), font=0, text=name))
35 res.append(MultiContentEntryText(pos=(120, 26), size=(320, 17), font=1, text=plugin.description))
37 if plugin.icon is None:
38 png = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/plugin.png"))
41 res.append(MultiContentEntryPixmapAlphaTest(pos=(10, 0), size=(100, 50), png = png))
45 class PluginList(MenuList):
46 def __init__(self, list, enableWrapAround=False):
47 MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
48 self.l.setFont(0, gFont("Regular", 20))
49 self.l.setFont(1, gFont("Regular", 14))
50 self.l.setItemHeight(50)