update sv, hy, lt, pl, fr language
[enigma2.git] / lib / python / Screens / StartWizard.py
index 96e1d6408fcbf512c04103262aa1a7e4a4ac8480..aab81f634c6a7dc0476918d646b4887f2ac93f38 100644 (file)
@@ -1,31 +1,32 @@
-from Wizard import Wizard, wizardManager
+from Wizard import wizardManager
+from Screens.WizardLanguage import WizardLanguage
+from Screens.ScanSetup import DefaultSatLists
+from Screens.DefaultWizard import DefaultWizard
+from Screens.Rc import Rc
 
-from Components.Pixmap import *
-from LanguageSelection import LanguageSelection
+from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap
+from Components.config import config, ConfigBoolean, configfile, ConfigSubsection
 
-class StartWizard(Wizard):
-       skin = """
-               <screen position="0,0" size="720,560" title="Welcome..." flags="wfNoBorder" >
-                       <widget name="text" position="50,100" size="440,200" font="Arial;23" />
-                       <widget name="list" position="50,300" zPosition="1" size="440,200" />
-                       <widget name="config" position="50,300" zPosition="1" size="440,200" transparent="1" />                 
-                       <widget name="step" position="50,50" size="440,25" font="Arial;23" />
-                       <widget name="stepslider" position="50,500" zPosition="1" borderWidth="2" size="440,20" backgroundColor="dark" />
-                       <widget name="rc" pixmap="/usr/share/enigma2/rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
-                       <widget name="arrowdown" pixmap="/usr/share/enigma2/arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
-                       <widget name="arrowup" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
-                       <widget name="arrowup2" pixmap="/usr/share/enigma2/arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
-               </screen>"""
-       
-       def __init__(self, session):
-               self.skin = StartWizard.skin
-               self.xmlfile = "startwizard.xml"
-               
-               Wizard.__init__(self, session)
-               self["rc"] = MovingPixmap()
-               self["arrowdown"] = MovingPixmap()
-               self["arrowup"] = MovingPixmap()
-               self["arrowup2"] = MovingPixmap()
+from LanguageSelection import LanguageWizard
+
+config.misc.firstrun = ConfigBoolean(default = True)
+config.misc.startwizard = ConfigSubsection()
+config.misc.startwizard.shownimconfig = ConfigBoolean(default = True)
+config.misc.startwizard.doservicescan = ConfigBoolean(default = True)
+config.misc.languageselected = ConfigBoolean(default = True)
+
+class StartWizard(DefaultSatLists, Rc):
+       def __init__(self, session, silent = True, showSteps = False, neededTag = None):
+               self.xmlfile = ["startwizard.xml", "defaultsatlists.xml"]
+               WizardLanguage.__init__(self, session, showSteps = False)
+               DefaultWizard.__init__(self, session, silent, showSteps, neededTag = "services")
+               Rc.__init__(self)
+               self["wizard"] = Pixmap()
+                               
+       def markDone(self):
+               config.misc.firstrun.value = 0
+               config.misc.firstrun.save()
+               configfile.save()
                
-wizardManager.registerWizard(LanguageSelection)
-wizardManager.registerWizard(StartWizard)
\ No newline at end of file
+wizardManager.registerWizard(LanguageWizard, config.misc.languageselected.value, priority = 5)
+wizardManager.registerWizard(StartWizard, config.misc.firstrun.value, priority = 20)