config entries must be defined globally
[enigma2.git] / lib / python / Plugins / SystemPlugins / Videomode / VideoWizard.py
index 32052e2..5524dfc 100644 (file)
@@ -5,6 +5,8 @@ from VideoHardware import video_hw
 from Components.Pixmap import Pixmap, MovingPixmap
 from Components.config import config, ConfigBoolean, configfile
 
+config.misc.showtestcard = ConfigBoolean(default = False)
+
 class VideoWizard(Wizard):
        skin = """
                <screen position="0,0" size="720,576" title="Welcome..." flags="wfNoBorder" >
@@ -36,6 +38,7 @@ class VideoWizard(Wizard):
                self.port = None
                self.mode = None
                
+               
        def createSummary(self):
                print "++++++++++++***++**** VideoWizard-createSummary"
                from Screens.Wizard import WizardSummary
@@ -71,7 +74,8 @@ class VideoWizard(Wizard):
                list = []
                print "modes for port", self.port
                for mode in self.hw.getModeList(self.port):
-                       list.append((mode[0], mode[0]))
+                       if mode[0] != "PC":
+                               list.append((mode[0], mode[0]))
                return list
        
        def modeSelectionMade(self, index):
@@ -111,3 +115,11 @@ class VideoWizard(Wizard):
        def rateSelect(self, rate):
                self.hw.setMode(port = self.port, mode = self.mode, rate = rate)
 
+       def showTestCard(self, selection = None):
+               if selection is None:
+                       selection = self.selection
+               print "set config.misc.showtestcard to", {'yes': True, 'no': False}[selection]
+               if selection == "yes":
+                       config.misc.showtestcard.value = True
+               else:
+                       config.misc.showtestcard.value = False