pass
for y in range(len(plugins)):
- if len(plugins[y]) < 4:
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][1], plugins[y][2], None))
+ if len(plugins[y]) < 5:
+ list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], None, plugins[y][1]))
else:
- list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][1], plugins[y][2], plugins[y][3]))
+ list.append((path + picturepaths[y], plugins[y][0] , x, plugins[y][2], plugins[y][3], plugins[y][4], plugins[y][1]))
if runAutostartPlugins:
try: plugin.autostart()
except: pass
RT_VALIGN_CENTER = 8
RT_VALIGN_BOTTOM = 16
-def PluginEntryComponent(picture, name):
+def PluginEntryComponent(picture, name, desc = "Plugin"):
res = [ None ]
- res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 10, 200, 50, 0, RT_HALIGN_LEFT , name))
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 5, 200, 25, 0, RT_HALIGN_LEFT , name))
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 80, 26, 200, 17, 1, RT_HALIGN_LEFT , desc))
png = loadPNG(picture)
if png == None:
png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/plugin.png"))
self.list = list
self.l.setList(list)
self.l.setFont(0, gFont("Regular", 20))
- self.l.setFont(1, gFont("Regular", 10))
+ self.l.setFont(1, gFont("Regular", 14))
def GUIcreate(self, parent):
self.instance = eListbox(parent)
for x in dir:
try:
if x[-3:] == "cfg":
- pluginlist.append((getPluginParams(x)["name"], "function", "main", x))
+ params = getPluginParams(x)
+ pluginlist.append((params["name"], params["desc"], "function", "main", x))
except:
pass
return pluginlist
def getPluginParams(file):
- file = open("/usr/lib/tuxbox/plugins/" + file, "r")
- lines = file.readlines()
- file.close()
params = {}
- for x in lines:
+ file = open("/usr/lib/tuxbox/plugins/" + file, "r")
+ for x in file.readlines():
split = x.split("=")
params[split[0]] = split[1]
+ file.close()
+
return params
def main(session, args):
- print "Running plugin with number", args
\ No newline at end of file
+ print "Running plugin " + args[:-4] + ".so with config file", args
+ print getPluginParams(args)
\ No newline at end of file
return ["update.png"]
def getPlugins():
- return [("Softwareupdate", "screen", "Example")]
+ return [("Softwareupdate", "Updates your receiver's software", "screen", "Example")]
def getMenuRegistrationList():
list = []
self.list = []
self.pluginlist = plugins.getPluginList()
for x in self.pluginlist:
- self.list.append(PluginEntryComponent(x[0], x[1]))
+ self.list.append(PluginEntryComponent(x[0], x[1], x[6]))
self["list"].l.setList(self.list)