save configfile after setting the video config
[enigma2.git] / lib / python / Plugins / SystemPlugins / Videomode / videowizard.xml
index bd714cef859155a469e2b13c0a488860cef5129d..df04086819f73f4c1a0463aee7ba304e75b441cd 100644 (file)
@@ -1,9 +1,10 @@
 <wizard>
        <step id="inputselection" nextstep="modeselection" timeout="10" timeoutaction="selectnext">
-               <text value="Video input selction\n\nPlease press OK if you can see this page on your TV (or select a different input port).\n\nThe next input port will be automatically probed in 10 seconds." />
+               <text value="Video input selection\n\nPlease press OK if you can see this page on your TV (or select a different input port).\n\nThe next input port will be automatically probed in 10 seconds." />
                <displaytext value="Select video input" />
                <list type="dynamic" source="listInputChannels" evaluation="inputSelectionMade" onselect="inputSelectionMoved" />
                <code>
+self["portpic"].show()
 self["arrowdown"].moveTo(557, 232, 1)
 self["arrowdown"].startMoving()
 self["arrowup"].moveTo(800, 232, 1)
@@ -25,14 +26,15 @@ self["arrowdown"].startMoving()
 self["arrowup"].startMoving()
 self["rc"].moveTo(500, 50, 1)
 self["rc"].startMoving()
+self["portpic"].hide()
                </code>
        </step>
        <step id="rateselection" nextstep="dvirateintroduction" timeout="10" timeoutaction="selectnext">
                <condition>
-self.condition = (self.port != "DVI")
+self.condition = (self.port != "DVI" or self.mode == "PC")
                </condition>            
                <text value="Refresh rate selection." />
-               <displaytext value="Select video mode rate" />
+               <displaytext value="Select refresh rate" />
                <list type="dynamic" source="listRates" evaluation="rateSelectionMade" onselect="rateSelectionMoved" />
                <code>
 self["arrowup2"].moveTo(800, 320, 1)
@@ -47,9 +49,9 @@ self["rc"].startMoving()
        </step>
        <step id="dvirateintroduction" nextstep="dvirateselection">
                <condition>
-self.condition = (self.port == "DVI")
+self.condition = (self.port == "DVI" and self.mode != "PC")
                </condition>
-               <text value="In the next step, the refresh rates are probed. Your screen can go black while probing.\nPlease press OK to begin." />
+               <text value="We will now test if your TV can also display this resolution at 50hz. If your screen goes black, wait 20 seconds and it will switch back to 60hz.\nPlease press OK to begin." />
                <displaytext value="Please follow the instructions on the TV" />
                <code>
 self["arrowdown"].moveTo(557, 232, 1)
@@ -58,17 +60,17 @@ self["arrowup"].moveTo(800, 232, 1)
 self["arrowup"].startMoving()
 self["rc"].moveTo(500, 50, 1)
 self["rc"].startMoving()
+self.rateSelect("60Hz")
                </code>
        </step>
-       <step id="dvirateselection" nextstep="end" timeout="10" timeoutaction="selectnext">
+       <step id="dvirateselection" timeout="10" timeoutaction="changestep" timeoutstep="notworking50Hz">
                <condition>
-self.condition = (self.port == "DVI")
+self.condition = (self.port == "DVI" and self.mode != "PC")
                </condition>
-               <text value="The refresh rates are probed right now. If you can see this screen with 50 Hz selected, you should use this as the preferred option for best picture quality." />
-               <displaytext value="Select video mode rate" />
-               <list evaluation="rateSelectionMade" onselect="rateSelectionMoved">
-                       <listentry caption="50 Hz" step="50 Hz" />
-                       <listentry caption="60 Hz" step="60 Hz" />
+               <text value="If you can see this page, please press OK." />
+               <displaytext value="" />
+               <list>
+                       <listentry caption="50 Hz" step="working50Hz" />
                </list>
                <code>
 self["arrowdown"].moveTo(557, 232, 1)
@@ -77,12 +79,53 @@ self["arrowup"].moveTo(800, 232, 1)
 self["arrowup"].startMoving()
 self["rc"].moveTo(500, 50, 1)
 self["rc"].startMoving()
+self.rateSelect("50Hz")
+               </code>
+               <code pos="after">
+self.rateSelect("60Hz")                        
+               </code>
+       </step>
+       <step id="notworking50Hz" nextstep="end">
+               <condition>
+self.condition = (self.port == "DVI" and self.mode != "PC")
+               </condition>
+               <text value="No 50 Hz, sorry. :(" />
+               <displaytext value="" />
+               <code>
+self["arrowdown"].moveTo(557, 232, 1)
+self["arrowdown"].startMoving()
+self["arrowup"].moveTo(800, 232, 1)
+self["arrowup"].startMoving()
+self["rc"].moveTo(500, 50, 1)
+self["rc"].startMoving()
+               </code>
+       </step>
+       <step id="working50Hz" nextstep="end" timeout="10" timeoutaction="nextstep">
+               <condition>
+self.condition = (self.port == "DVI" and self.mode != "PC")
+               </condition>
+               <text value="Your TV works with 50 Hz. Good!" />
+               <displaytext value="" />
+               <code>
+self["arrowdown"].moveTo(557, 232, 1)
+self["arrowdown"].startMoving()
+self["arrowup"].moveTo(800, 232, 1)
+self["arrowup"].startMoving()
+self["rc"].moveTo(500, 50, 1)
+self["rc"].startMoving()
+self.rateSelect("50Hz")
                </code>
        </step>
        <step id="end">
+               <code>
+self.hw.saveMode(self.port, self.mode, self.rate)
+from Components.config import configfile
+configfile.save() 
+               </code>
                <text value="The input port should be configured now.\nYou can now configure the screen by displaying some test pictures. Do you want to do that now?" />
+               <!--text value="You have successfully finished the video setup. If you want to change the settings later, you can do this in the settings menu."/-->
                <displaytext value="No picture on TV? Press EXIT and retry." />
-               <list evaluation="rateSelectionMade" onselect="rateSelectionMoved">
+               <list evaluation="showTestCard" onselect="showTestCard">
                        <listentry caption="Yes" step="yes" />
                        <listentry caption="No" step="no" />
                </list>