X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/dcc4a84bbe28965292b92a0242d9c68e6e0dbba8..c1e207b8fc71d8d909559887c0b8b9351ce9f86c:/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 b9c85ec9..3536ca66 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py @@ -1,16 +1,8 @@ from Screens.Screen import Screen from Plugins.Plugin import PluginDescriptor -from enigma import eTimer - -from Components.ActionMap import ActionMap -from Components.Label import Label -from Components.Pixmap import Pixmap -from Screens.MessageBox import MessageBox -from Screens.Setup import SetupSummary from Components.ConfigList import ConfigListScreen from Components.config import getConfigListEntry, config -from VideoWizard import VideoWizard from Components.config import config from VideoHardware import video_hw @@ -30,16 +22,20 @@ class VideoSetup(Screen, ConfigListScreen): self.list = [ ] ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry) + from Components.ActionMap import ActionMap self["actions"] = ActionMap(["SetupActions"], { "cancel": self.keyCancel, "save": self.apply, }, -2) - self["title"] = Label(_("Video-Setup")) + from Components.Label import Label + self["title"] = Label(_("A/V Settings")) self["oktext"] = Label(_("OK")) self["canceltext"] = Label(_("Cancel")) + + from Components.Pixmap import Pixmap self["ok"] = Pixmap() self["cancel"] = Pixmap() @@ -53,17 +49,27 @@ class VideoSetup(Screen, ConfigListScreen): self.hw.on_hotplug.remove(self.createSetup) def createSetup(self): + level = config.usage.setup_level.index + self.list = [ ] - self.list.append(getConfigListEntry(_("Output Type"), config.av.videoport)) + self.list.append(getConfigListEntry(_("Video Output"), config.av.videoport)) # if we have modes for this port: 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(_("Rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value])) + self.list.append(getConfigListEntry(_("Refresh Rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value])) # if config.av.videoport.value == "DVI": # self.list.append(getConfigListEntry(_("Allow Unsupported Modes"), config.av.edid_override)) + if config.av.videoport.value == "Scart": + self.list.append(getConfigListEntry(_("Color Format"), config.av.colorformat)) + self.list.append(getConfigListEntry(_("Aspect Ratio"), config.av.aspectratio)) + if level >= 1: + self.list.append(getConfigListEntry(_("WSS on 4:3"), config.av.wss)) + + if level >= 1: + self.list.append(getConfigListEntry(_("AC3 default"), config.av.defaultac3)) self["config"].list = self.list self["config"].l.setList(self.list) @@ -92,8 +98,9 @@ class VideoSetup(Screen, ConfigListScreen): port = config.av.videoport.value mode = config.av.videomode[port].value rate = config.av.videorate[mode].value - if (port, mode, rate) != self.last_good or True: + if (port, mode, rate) != self.last_good: 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) else: self.keySave() @@ -110,6 +117,7 @@ class VideoSetup(Screen, ConfigListScreen): return str(self["config"].getCurrent()[1].getText()) def createSummary(self): + from Screens.Setup import SetupSummary return SetupSummary class VideomodeHotplug: @@ -169,7 +177,11 @@ def startSetup(menuid): if menuid != "system": return [ ] - return [(_("Video Setup"), videoSetupMain, "video_setup", None)] + return [(_("A/V Settings") + "...", videoSetupMain, "av_setup", 40)] + +def VideoWizard(*args, **kwargs): + from VideoWizard import VideoWizard + return VideoWizard(*args, **kwargs) def Plugins(**kwargs): list = [ @@ -177,5 +189,5 @@ def Plugins(**kwargs): PluginDescriptor(name=_("Video Setup"), description=_("Advanced Video Setup"), where = PluginDescriptor.WHERE_MENU, fnc=startSetup) ] if config.misc.firstrun.value: - list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=VideoWizard)) + list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(0, VideoWizard))) return list