diff options
| author | acid-burn <acidburn@opendreambox.org> | 2009-10-06 18:22:53 +0200 |
|---|---|---|
| committer | acid-burn <acidburn@opendreambox.org> | 2009-10-06 18:22:53 +0200 |
| commit | 0b5125e1eb81ed8aa17f056f7f46f75efc4d0964 (patch) | |
| tree | da2e2d0cf0b4d949c14f7108c15229d21c72c37b /lib/python/Plugins/SystemPlugins | |
| parent | 97164baf8ea068ec7c4326d656c5c8f5ba262750 (diff) | |
| download | enigma2-0b5125e1eb81ed8aa17f056f7f46f75efc4d0964.tar.gz enigma2-0b5125e1eb81ed8aa17f056f7f46f75efc4d0964.zip | |
/Videomode/plugin.py: - use StaticText for Buttons
- use own Skin for better skinability
- use same translateable string for screen title and lcd title
Diffstat (limited to 'lib/python/Plugins/SystemPlugins')
| -rwxr-xr-x[-rw-r--r--] | lib/python/Plugins/SystemPlugins/Videomode/plugin.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py index 1b820fb1..db810f0c 100644..100755 --- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py @@ -3,16 +3,17 @@ from Plugins.Plugin import PluginDescriptor from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen 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" + self.setup_title = _("A/V Settings") self.hw = hw self.onChangedEntry = [ ] @@ -30,18 +31,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) @@ -231,4 +229,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 |
