+from enigma import loadPNG
+
class PluginDescriptor:
"""An object to describe a plugin."""
# reason (0: start, 1: end)
WHERE_AUTOSTART = 5
+ # start as wizard. In that case, fnc must be a screen class!
+ WHERE_WIZARD = 6
+
def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None):
self.name = name
if type(where) is list:
else:
self.where = [ where ]
self.description = description
- if type(fnc) is str:
- self.icon = loadPNG("..")
- else:
- self.icon = icon
+
+ self.iconstr = icon
+ self.icon = None
+
self.__call__ = fnc
+
+ def updateIcon(self, path):
+ if type(self.iconstr) is str:
+ self.icon = loadPNG(path + self.iconstr)
+ else:
+ self.icon = None
+
+ def __eq__(self, other):
+ return self.__call__ == other.__call__