1 from HTMLComponent import *
2 from GUIComponent import *
4 from MenuList import MenuList
6 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
7 from Components.MultiContent import RT_HALIGN_LEFT, MultiContentEntryText, MultiContentEntryPixmapAlphaTest
11 def PluginEntryComponent(plugin):
14 res.append(MultiContentEntryText(pos=(80, 5), size=(300, 25), font=0, text=plugin.name))
15 res.append(MultiContentEntryText(pos=(80, 26), size=(300, 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=(60, 40), png = png))
25 def PluginCategoryComponent(name, png):
28 res.append(MultiContentEntryText(pos=(80, 5), size=(300, 25), font=0, text=name))
29 res.append(MultiContentEntryPixmapAlphaTest(pos=(0, 0), size=(60, 50), png = png))
33 def PluginDownloadComponent(plugin, name):
36 res.append(MultiContentEntryText(pos=(80, 5), size=(300, 25), font=0, text=name))
37 res.append(MultiContentEntryText(pos=(80, 26), size=(300, 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=(0, 0), size=(60, 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))
58 def postWidgetCreate(self, instance):
59 instance.setContent(self.l)
60 instance.setItemHeight(50)