X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/700f532b8d7fb96ec6af2ac54526f66a834623c3..939e78997bc25b22b3270ae3e298b0cc49becdbf:/lib/python/Screens/Wizard.py diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py index 07c5f9af..97b07bfd 100644 --- a/lib/python/Screens/Wizard.py +++ b/lib/python/Screens/Wizard.py @@ -14,19 +14,7 @@ from xml.sax.handler import ContentHandler config.misc.firstrun = configElementBoolean("config.misc.firstrun", 1); -class WelcomeWizard(Screen, HelpableScreen): - - skin = """ - - - - - - - - - - """ +class Wizard(Screen, HelpableScreen): class parseWizard(ContentHandler): def __init__(self, wizard): @@ -61,25 +49,20 @@ class WelcomeWizard(Screen, HelpableScreen): self.wizard[self.lastStep]["code"] = self.wizard[self.lastStep]["code"] + ch def __init__(self, session): - self.skin = WelcomeWizard.skin - Screen.__init__(self, session) HelpableScreen.__init__(self) self.wizard = {} parser = make_parser() - print "Reading startwizard.xml" + print "Reading " + self.xmlfile wizardHandler = self.parseWizard(self.wizard) parser.setContentHandler(wizardHandler) - parser.parse('/usr/share/enigma2/startwizard.xml') + parser.parse('/usr/share/enigma2/' + self.xmlfile) self.numSteps = len(self.wizard) self.currStep = 1 self["text"] = Label() - self["rc"] = MovingPixmap() - self["arrowdown"] = MovingPixmap() - self["arrowup"] = MovingPixmap() self["config"] = ConfigList([]) @@ -208,12 +191,17 @@ class WelcomeWizard(Screen, HelpableScreen): else: self["config"].l.setList([]) - - -def listActiveWizards(): - wizards = [ ] - - if config.misc.firstrun.value: - wizards.append(WelcomeWizard) +class WizardManager: + def __init__(self): + self.wizards = [] - return wizards + def registerWizard(self, wizard): + self.wizards.append(wizard) + + def getWizards(self): + if config.misc.firstrun.value: + return self.wizards + else: + return [] + +wizardManager = WizardManager()