X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/2a8ecd871020fdd668cf5500460e5a6e7851b4b0..9208ede8da1fd495eafc24b9dd2d75d84f8a5952:/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 2f8e8e78..095e94c0 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -1,22 +1,20 @@ -from Screens.Wizard import wizardManager, WizardSummary +from Screens.Wizard import WizardSummary from Screens.WizardLanguage import WizardLanguage -import sys +from Screens.Rc import Rc from VideoHardware import video_hw -from Components.Pixmap import Pixmap, MovingPixmap +from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap from Components.config import config, ConfigBoolean, configfile -from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE -from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT -from Tools.LoadPixmap import LoadPixmap +from Tools.Directories import resolveFilename, SCOPE_PLUGINS config.misc.showtestcard = ConfigBoolean(default = False) class VideoWizardSummary(WizardSummary): skin = """ - - + + @@ -32,7 +30,7 @@ class VideoWizardSummary(WizardSummary): def setLCDPic(self, file): self["pic"].instance.setPixmapFromFile(file) -class VideoWizard(WizardLanguage): +class VideoWizard(WizardLanguage, Rc): skin = """ @@ -44,8 +42,9 @@ class VideoWizard(WizardLanguage): - + + """ % (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/Scart.png")) @@ -56,12 +55,9 @@ class VideoWizard(WizardLanguage): self.hw = video_hw WizardLanguage.__init__(self, session, showSteps = False, showStepSlider = False) + Rc.__init__(self) self["wizard"] = Pixmap() - self["rc"] = MovingPixmap() self["portpic"] = Pixmap() - self["arrowdown"] = MovingPixmap() - self["arrowup"] = MovingPixmap() - self["arrowup2"] = MovingPixmap() self.port = None self.mode = None @@ -74,7 +70,9 @@ class VideoWizard(WizardLanguage): return VideoWizardSummary def markDone(self): - pass + config.misc.videowizardenabled.value = 0 + config.misc.videowizardenabled.save() + configfile.save() def listInputChannels(self): list = [] @@ -101,13 +99,15 @@ class VideoWizard(WizardLanguage): 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]) + self.port = port + ratesList = self.listRates(modeList[0][0]) + self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0]) def listModes(self): 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 +135,11 @@ class VideoWizard(WizardLanguage): print mode if mode[0] == querymode: for rate in mode[1]: + if self.port == "DVI-PC": + print "rate:", rate + if rate == "640x480": + list.insert(0, (rate, rate)) + continue list.append((rate, rate)) return list