store video setup after finishing video wizard
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 2 Mar 2008 19:58:40 +0000 (19:58 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 2 Mar 2008 19:58:40 +0000 (19:58 +0000)
lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml

index 177cbd09bd1638f6f13b369c4c630127f79cbf41..f3e3c07a6bd171d73e95ee61628528d50670d6df 100644 (file)
@@ -137,6 +137,11 @@ class VideoHardware:
                        open("/proc/stb/video/aspect", "w").write("any")
                        open("/proc/stb/video/policy", "w").write("panscan")
 
+       def saveMode(self, port, mode, rate):
+               config.av.videoport.value = port
+               config.av.videomode[port].value = mode
+               config.av.videorate[mode].value = rate
+
        def isPortAvailable(self, port):
                # fixme
                return True
@@ -194,6 +199,7 @@ class VideoHardware:
 
                rate = config.av.videorate[mode].value
                self.setMode(port, mode, rate)
+               
 
 config.av.edid_override = ConfigYesNo(default = False)
 video_hw = VideoHardware()
index b4223b5ff455c2e05644f7f3d4e9e0c6ffd6758e..0e67fb626ae8f0c0a15c7478886cda1ddcaf2494 100644 (file)
@@ -62,6 +62,7 @@ class VideoWizard(Wizard):
                
                self.port = None
                self.mode = None
+               self.rate = None
                
                
        def createSummary(self):
@@ -135,6 +136,7 @@ class VideoWizard(Wizard):
        
        def rateSelectionMade(self, index):
                print "rateSelectionMade:", index
+               self.rate = index
                self.rateSelect(index)
                
        def rateSelectionMoved(self):
index 681a66331d8e1747d6a94352b63ac241825c8ad4..cb7d41edfed447eb7326660eaa636ad61c8d7189 100644 (file)
@@ -117,6 +117,9 @@ self.rateSelect("50Hz")
                </code>
        </step>
        <step id="end">
+               <code>
+self.hw.saveMode(self.port, self.mode, self.rate)
+               </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." />