- allow multiple xml control files for one wizard (to combine wizards, that should...
[enigma2.git] / lib / python / Screens / StartWizard.py
1 from Wizard import wizardManager
2 from Screens.WizardLanguage import WizardLanguage
3 from Screens.ScanSetup import DefaultSatLists
4 from Screens.DefaultWizard import DefaultWizard
5
6 from Components.Pixmap import Pixmap, MovingPixmap
7 from Components.config import config, ConfigBoolean, configfile, ConfigSubsection
8
9 from LanguageSelection import LanguageSelection
10
11 config.misc.firstrun = ConfigBoolean(default = True)
12 config.misc.startwizard = ConfigSubsection()
13 config.misc.startwizard.shownimconfig = ConfigBoolean(default = True)
14 config.misc.startwizard.doservicescan = ConfigBoolean(default = True)
15 config.misc.languageselected = ConfigBoolean(default = True)
16
17 class StartWizard(DefaultSatLists):
18         def __init__(self, session, silent = True, showSteps = False, neededTag = None):
19                 self.xmlfile = ["startwizard.xml", "defaultsatlists.xml"]
20                 WizardLanguage.__init__(self, session, showSteps = False)
21                 DefaultWizard.__init__(self, session, silent, showSteps, neededTag = "services")
22                 self["wizard"] = Pixmap()
23                 self["rc"] = MovingPixmap()
24                 self["arrowdown"] = MovingPixmap()
25                 self["arrowup"] = MovingPixmap()
26                 self["arrowup2"] = MovingPixmap()
27                 
28         def markDone(self):
29                 config.misc.firstrun.value = 0
30                 config.misc.firstrun.save()
31                 configfile.save()
32                 
33 wizardManager.registerWizard(LanguageSelection, config.misc.languageselected.value, priority = 5)
34 wizardManager.registerWizard(StartWizard, config.misc.firstrun.value, priority = 20)