X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/2f2b96fef51a5b4bfeb599f9785ecb6315c1fd4d..bfb6b4765a85a65047655ad4282756ca31229c3e:/lib/python/Plugins/SystemPlugins/Videomode/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py index aac25d6b..b51cc08d 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py @@ -1,12 +1,13 @@ from Screens.Screen import Screen from Plugins.Plugin import PluginDescriptor - +from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen -from Components.config import getConfigListEntry, config -from Components.config import config +from Components.config import getConfigListEntry, config, ConfigBoolean from VideoHardware import video_hw +config.misc.videowizardenabled = ConfigBoolean(default = True) + class VideoSetup(Screen, ConfigListScreen): def __init__(self, session, hw): Screen.__init__(self, session) @@ -58,7 +59,10 @@ class VideoSetup(Screen, ConfigListScreen): if config.av.videoport.value in config.av.videomode: # add mode- and rate-selection: self.list.append(getConfigListEntry(_("Mode"), config.av.videomode[config.av.videoport.value])) - self.list.append(getConfigListEntry(_("Refresh Rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value])) + if config.av.videomode[config.av.videoport.value].value == 'PC': + self.list.append(getConfigListEntry(_("Resolution"), config.av.videorate[config.av.videomode[config.av.videoport.value].value])) + else: + self.list.append(getConfigListEntry(_("Refresh Rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value])) port = config.av.videoport.value if port not in config.av.videomode: @@ -83,9 +87,13 @@ class VideoSetup(Screen, ConfigListScreen): self.list.append(getConfigListEntry(_("Color Format"), config.av.colorformat)) if level >= 1: self.list.append(getConfigListEntry(_("WSS on 4:3"), config.av.wss)) + if SystemInfo["ScartSwitch"]: + self.list.append(getConfigListEntry(_("Auto scart switching"), config.av.vcrswitch)) if level >= 1: self.list.append(getConfigListEntry(_("AC3 default"), config.av.defaultac3)) + if SystemInfo["CanDownmixAC3"]: + self.list.append(getConfigListEntry(_("AC3 downmix"), config.av.downmix_ac3)) self["config"].list = self.list self["config"].l.setList(self.list) @@ -100,6 +108,9 @@ class VideoSetup(Screen, ConfigListScreen): def confirm(self, confirmed): if not confirmed: + config.av.videoport.value = self.last_good[0] + config.av.videomode[self.last_good[0]].value = self.last_good[1] + config.av.videorate[self.last_good[1]].value = self.last_good[2] self.hw.setMode(*self.last_good) else: self.keySave() @@ -113,8 +124,11 @@ class VideoSetup(Screen, ConfigListScreen): def apply(self): port = config.av.videoport.value mode = config.av.videomode[port].value - rate = config.av.videorate[mode].value + rate =config.av.videorate[mode].value if (port, mode, rate) != self.last_good: + config.av.videoport.value = self.last_good[0] + config.av.videomode[port].value = self.last_good[1] + config.av.videorate[mode].value = self.last_good[2] self.hw.setMode(port, mode, rate) from Screens.MessageBox import MessageBox self.session.openWithCallback(self.confirm, MessageBox, "Is this videomode ok?", MessageBox.TYPE_YESNO, timeout = 20, default = False) @@ -204,6 +218,6 @@ def Plugins(**kwargs): # PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart), PluginDescriptor(name=_("Video Setup"), description=_("Advanced Video Setup"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) ] - if config.misc.firstrun.value: + if config.misc.videowizardenabled.value: list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(0, VideoWizard))) return list