X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3861923553aad99f8b1a5ce5d81e7d9b035b65bb..6874d42b68d15fa07542bc536535539997d9ba68:/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py index 8fffa5a9..5524dfce 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -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 = """ @@ -36,6 +38,7 @@ class VideoWizard(Wizard): self.port = None self.mode = None + def createSummary(self): print "++++++++++++***++**** VideoWizard-createSummary" from Screens.Wizard import WizardSummary @@ -55,36 +58,68 @@ class VideoWizard(Wizard): def inputSelectionMade(self, index): print "inputSelectionMade:", index self.port = index + self.inputSelect(index) def inputSelectionMoved(self): - print "selection moved:", self.selection + print "input selection moved:", self.selection + self.inputSelect(self.selection) + + def inputSelect(self, port): + print "inputSelect:", port + modeList = self.hw.getModeList(self.selection) + print "modeList:", modeList + self.hw.setMode(port = port, mode = modeList[0][0], rate = modeList[0][1][0]) def listModes(self): 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): print "modeSelectionMade:", index self.mode = index + self.modeSelect(index) def modeSelectionMoved(self): - print "selection moved:", self.selection + print "mode selection moved:", self.selection + self.modeSelect(self.selection) + + def modeSelect(self, mode): + ratesList = self.listRates(mode) + print "ratesList:", ratesList + self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) - def listRates(self): + def listRates(self, querymode = None): + if querymode is None: + querymode = self.mode list = [] - print "modes for port", self.port + print "modes for port", self.port, "and mode", querymode for mode in self.hw.getModeList(self.port): print mode - if mode[0] == self.mode: + if mode[0] == querymode: for rate in mode[1]: list.append((rate, rate)) return list def rateSelectionMade(self, index): print "rateSelectionMade:", index + self.rateSelect(index) def rateSelectionMoved(self): - print "selection moved:", self.selection + print "rate selection moved:", self.selection + self.rateSelect(self.selection) + + 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