treat the LanguageSelection as an own wizard, so it is started first on a firstrun
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 11 Dec 2005 03:52:19 +0000 (03:52 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 11 Dec 2005 03:52:19 +0000 (03:52 +0000)
save the language to the config-entry config.osd.language

data/startwizard.xml
lib/python/Screens/LanguageSelection.py
lib/python/Screens/StartWizard.py

index fbc1d49..d4c7efa 100644 (file)
@@ -1,8 +1,5 @@
 <wizard>
                <step number="1">
 <wizard>
                <step number="1">
-                       <config screen="LanguageSelection" module="LanguageSelection" type="standalone" />
-               </step>
-               <step number="2">
                        <text value="Hello User.\n\nThis start-wizard will guide you through the basic setup of your Dreambox.\n\nPress the OK button on your remote control to move to the next step." />
                        <code>
 self["arrowdown"].moveTo(557, 232, 10)
                        <text value="Hello User.\n\nThis start-wizard will guide you through the basic setup of your Dreambox.\n\nPress the OK button on your remote control to move to the next step." />
                        <code>
 self["arrowdown"].moveTo(557, 232, 10)
@@ -11,7 +8,7 @@ self["arrowdown"].startMoving()
 self["rc"].startMoving()
                        </code>
                </step>
 self["rc"].startMoving()
                        </code>
                </step>
-               <step number="3">
+               <step number="2">
                        <text value="Use the up/down keys on your remote control to select an option. After that, press OK." />
                        <list>
                                <listentry caption="Use wizard to set up basic features" step="next" />
                        <text value="Use the up/down keys on your remote control to select an option. After that, press OK." />
                        <list>
                                <listentry caption="Use wizard to set up basic features" step="next" />
@@ -24,7 +21,7 @@ self["arrowdown"].startMoving()
 self["arrowup"].startMoving()
                        </code>
                </step>
 self["arrowup"].startMoving()
                        </code>
                </step>
-               <step number="4">
+               <step number="3">
                        <text value="Please set up tuner A" />
                        <config screen="NimSetup" module="Satconfig" args="0" type="ConfigList" />
                        <code>
                        <text value="Please set up tuner A" />
                        <config screen="NimSetup" module="Satconfig" args="0" type="ConfigList" />
                        <code>
@@ -36,7 +33,7 @@ self["arrowdown"].addMovePoint(610, 300, 10)
 self["arrowdown"].startMoving()
                        </code>
                </step>
 self["arrowdown"].startMoving()
                        </code>
                </step>
-               <step number="5">
+               <step number="4">
                        <text value="Please set up tuner B" />
                        <config screen="NimSetup" module="Satconfig" args="1" type="ConfigList" />
                        <code>
                        <text value="Please set up tuner B" />
                        <config screen="NimSetup" module="Satconfig" args="1" type="ConfigList" />
                        <code>
@@ -48,14 +45,14 @@ self["arrowdown"].addMovePoint(610, 300, 10)
 self["arrowdown"].startMoving()
                        </code>
                </step>
 self["arrowdown"].startMoving()
                        </code>
                </step>
-               <step number="6">
+               <step number="5">
                        <text value="Do you want to do a service scan?" />
                        <list>
                                <listentry caption="Yes, scan now" step="next" />
                        <text value="Do you want to do a service scan?" />
                        <list>
                                <listentry caption="Yes, scan now" step="next" />
-                               <listentry caption="No, scan later manually" step="8" />
+                               <listentry caption="No, scan later manually" step="7" />
                        </list>
                </step>
                        </list>
                </step>
-               <step number="7">
+               <step number="6">
                        <text value="What do you want to scan?" />
                        <config screen="ScanSimple" module="ScanSetup" type="ConfigList" />
                        <code>
                        <text value="What do you want to scan?" />
                        <config screen="ScanSimple" module="ScanSetup" type="ConfigList" />
                        <code>
@@ -67,7 +64,7 @@ self["arrowdown"].addMovePoint(610, 300, 10)
 self["arrowdown"].startMoving()
                        </code>
                </step>
 self["arrowdown"].startMoving()
                        </code>
                </step>
-               <step number="8">
+               <step number="7">
                        <text value="Thanx for using the wizard. Your box is now ready to use." />
                        <code>
 self["arrowdown"].moveTo(740, 200, 10)
                        <text value="Thanx for using the wizard. Your box is now ready to use." />
                        <code>
 self["arrowdown"].moveTo(740, 200, 10)
index 42f5420..a51c067 100644 (file)
@@ -4,6 +4,7 @@ from Components.MenuList import MenuList
 from Components.ActionMap import ActionMap
 from Components.Language import language
 from Components.LanguageList import *
 from Components.ActionMap import ActionMap
 from Components.Language import language
 from Components.LanguageList import *
+from Components.config import config
 
 
 class LanguageSelection(Screen):
 
 
 class LanguageSelection(Screen):
@@ -23,7 +24,6 @@ class LanguageSelection(Screen):
                        "ok": self.save,
                        "cancel": self.close
                })
                        "ok": self.save,
                        "cancel": self.close
                })
-               print "INIT LANGUAGESELECTION"
                
        def save(self):
                self.run()
                
        def save(self):
                self.run()
@@ -31,3 +31,5 @@ class LanguageSelection(Screen):
        
        def run(self):
                language.activateLanguage(self["list"].l.getCurrentSelectionIndex())
        
        def run(self):
                language.activateLanguage(self["list"].l.getCurrentSelectionIndex())
+               config.osd.language.value = self["list"].l.getCurrentSelectionIndex()
+               config.osd.language.save()
index 736b3ef..1cb0bd8 100644 (file)
@@ -1,6 +1,7 @@
 from Wizard import Wizard, wizardManager
 
 from Components.Pixmap import *
 from Wizard import Wizard, wizardManager
 
 from Components.Pixmap import *
+from LanguageSelection import LanguageSelection
 
 class StartWizard(Wizard):
        skin = """
 
 class StartWizard(Wizard):
        skin = """
@@ -24,4 +25,5 @@ class StartWizard(Wizard):
                self["arrowdown"] = MovingPixmap()
                self["arrowup"] = MovingPixmap()
                
                self["arrowdown"] = MovingPixmap()
                self["arrowup"] = MovingPixmap()
                
+wizardManager.registerWizard(LanguageSelection)
 wizardManager.registerWizard(StartWizard)
\ No newline at end of file
 wizardManager.registerWizard(StartWizard)
\ No newline at end of file