X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/52e7764d593cac1acf78aeb1cccb21fa5737a436..43f543871592eda0489f6dcbf3ad901309aaa9f9:/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 old mode 100644 new mode 100755 index 7a2127ac..39c1131a --- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py @@ -2,17 +2,20 @@ 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, ConfigBoolean +from Components.config import getConfigListEntry, config, ConfigBoolean, ConfigNothing, ConfigSlider +from Components.Sources.StaticText import StaticText from VideoHardware import video_hw config.misc.videowizardenabled = ConfigBoolean(default = True) class VideoSetup(Screen, ConfigListScreen): + def __init__(self, session, hw): Screen.__init__(self, session) - self.skinName = "Setup" - self.setup_title = "Videomode Setup" + # for the skin: first try VideoSetup, then Setup, this allows individual skinning + self.skinName = ["VideoSetup", "Setup" ] + self.setup_title = _("A/V Settings") self.hw = hw self.onChangedEntry = [ ] @@ -30,18 +33,15 @@ class VideoSetup(Screen, ConfigListScreen): "save": self.apply, }, -2) - 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() + self["key_red"] = StaticText(_("Cancel")) + self["key_green"] = StaticText(_("OK")) self.createSetup() self.grabLastGoodMode() + self.onLayoutFinish.append(self.layoutFinished) + + def layoutFinished(self): + self.setTitle(self.setup_title) def startHotplug(self): self.hw.on_hotplug.append(self.createSetup) @@ -106,6 +106,9 @@ class VideoSetup(Screen, ConfigListScreen): if SystemInfo["CanChangeOsdAlpha"]: self.list.append(getConfigListEntry(_("OSD visibility"), config.av.osd_alpha)) + if not isinstance(config.av.scaler_sharpness, ConfigNothing): + self.list.append(getConfigListEntry(_("Scaler sharpness"), config.av.scaler_sharpness)) + self["config"].list = self.list self["config"].l.setList(self.list) @@ -215,7 +218,7 @@ def startSetup(menuid): if menuid != "system": return [ ] - return [(_("A/V Settings") + "...", videoSetupMain, "av_setup", 40)] + return [(_("A/V Settings"), videoSetupMain, "av_setup", 40)] def VideoWizard(*args, **kwargs): from VideoWizard import VideoWizard @@ -228,4 +231,4 @@ def Plugins(**kwargs): ] if config.misc.videowizardenabled.value: list.append(PluginDescriptor(name=_("Video Wizard"), where = PluginDescriptor.WHERE_WIZARD, fnc=(0, VideoWizard))) - return list + return list