# 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:
def runReactor():
reactor.run()
-except:
+except ImportError:
print "twisted not available"
def runReactor():
runMainloop()
from Screens.StartWizard import *
from Screens.TutorialWizard import *
from Tools.BoundFunction import boundFunction
+from Plugins.Plugin import PluginDescriptor
had = dict()
session.nav = Navigation()
screensToRun = wizardManager.getWizards()
+ for p in plugins.getPlugins(PluginDescriptor.WHERE_WIZARD):
+ screensToRun.append(p.__call__)
screensToRun.append(Screens.InfoBar.InfoBar)
def runNextScreen(session, screensToRun, *result):
if result:
- quitMainloop(result)
+ quitMainloop(*result)
screen = screensToRun[0]