d0ece2950ad47576ec0dcc00e6018978bfbd1914
[enigma2.git] / lib / python / Screens / StartWizard.py
1 from Wizard import wizardManager
2 from Screens.WizardLanguage import WizardLanguage
3
4 from Components.Pixmap import Pixmap, MovingPixmap
5 from Components.config import config, ConfigBoolean, configfile, ConfigSubsection
6
7 from LanguageSelection import LanguageSelection
8
9 config.misc.firstrun = ConfigBoolean(default = True)
10 config.misc.startwizard = ConfigSubsection()
11 config.misc.startwizard.shownimconfig = ConfigBoolean(default = True)
12 config.misc.startwizard.doservicescan = ConfigBoolean(default = True)
13 config.misc.languageselected = ConfigBoolean(default = True)
14
15 class StartWizard(WizardLanguage):
16         def __init__(self, session):
17                 self.xmlfile = "startwizard.xml"
18                 WizardLanguage.__init__(self, session, showSteps = False)
19                 self["wizard"] = Pixmap()
20                 self["rc"] = MovingPixmap()
21                 self["arrowdown"] = MovingPixmap()
22                 self["arrowup"] = MovingPixmap()
23                 self["arrowup2"] = MovingPixmap()
24                 
25         def markDone(self):
26                 config.misc.firstrun.value = 0
27                 config.misc.firstrun.save()
28                 configfile.save()
29                 
30 wizardManager.registerWizard(LanguageSelection, config.misc.languageselected.value, priority = 5)
31 wizardManager.registerWizard(StartWizard, config.misc.firstrun.value, priority = 20)