X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/bc851c60af8c44be9d5b24637ce335a8abf20401..b6b0a7d3c89c6f7fa4f6b64950b8963658f2baab:/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 b4223b5f..f46b11c2 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -1,4 +1,5 @@ -from Screens.Wizard import Wizard, wizardManager, WizardSummary +from Screens.Wizard import wizardManager, WizardSummary +from Screens.WizardLanguage import WizardLanguage import sys from VideoHardware import video_hw @@ -31,20 +32,22 @@ class VideoWizardSummary(WizardSummary): def setLCDPic(self, file): self["pic"].instance.setPixmapFromFile(file) -class VideoWizard(Wizard): +class VideoWizard(WizardLanguage): skin = """ - - + + + + - - - - + + + + """ % (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/Scart.png")) def __init__(self, session): @@ -52,7 +55,7 @@ class VideoWizard(Wizard): self.xmlfile = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/videowizard.xml") self.hw = video_hw - Wizard.__init__(self, session, showSteps = False, showStepSlider = False) + WizardLanguage.__init__(self, session, showSteps = False, showStepSlider = False) self["wizard"] = Pixmap() self["rc"] = MovingPixmap() self["portpic"] = Pixmap() @@ -62,6 +65,7 @@ class VideoWizard(Wizard): self.port = None self.mode = None + self.rate = None def createSummary(self): @@ -70,7 +74,9 @@ class VideoWizard(Wizard): return VideoWizardSummary def markDone(self): - pass + config.misc.videowizardenabled.value = 0 + config.misc.videowizardenabled.save() + configfile.save() def listInputChannels(self): list = [] @@ -78,6 +84,7 @@ class VideoWizard(Wizard): for port in self.hw.getPortList(): if self.hw.isPortUsed(port): list.append((port,port)) + list.sort(key = lambda x: x[0]) print "listInputChannels:", list return list @@ -102,7 +109,7 @@ class VideoWizard(Wizard): list = [] print "modes for port", self.port for mode in self.hw.getModeList(self.port): - if mode[0] != "PC": + #if mode[0] != "PC": list.append((mode[0], mode[0])) print "modeslist:", list return list @@ -135,6 +142,7 @@ class VideoWizard(Wizard): def rateSelectionMade(self, index): print "rateSelectionMade:", index + self.rate = index self.rateSelect(index) def rateSelectionMoved(self): @@ -152,3 +160,16 @@ class VideoWizard(Wizard): config.misc.showtestcard.value = True else: config.misc.showtestcard.value = False + + def keyNumberGlobal(self, number): + if number in [1,2,3]: + if number == 1: + self.hw.saveMode("DVI", "720p", "multi") + elif number == 2: + self.hw.saveMode("DVI", "1080i", "multi") + elif number == 3: + self.hw.saveMode("Scart", "Multi", "multi") + self.hw.setConfiguredMode() + self.close() + + WizardLanguage.keyNumberGlobal(self, number)