aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/Videomode
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-02-24 20:56:21 +0100
committerghost <andreas.monzner@multimedia-labs.de>2009-02-24 20:56:21 +0100
commit574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f (patch)
treee2ded87bb0e66cd9e88ae8d4ffc3846f788343bf /lib/python/Plugins/SystemPlugins/Videomode
parent5a6bde9419249a78c957093e0cc438d7c6eeb46c (diff)
downloadenigma2-574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f.tar.gz
enigma2-574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f.zip
small optimizations and cleanups by Moritz Venn
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/Videomode')
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py4
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/plugin.py13
3 files changed, 11 insertions, 8 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index 6a85c4da..64f79e04 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@ -67,7 +67,7 @@ class VideoHardware:
else:
mode = config.av.videomode[port].value
force_widescreen = self.isWidescreenMode(port, mode)
- is_widescreen = force_widescreen or config.av.aspect.value in ["16_9", "16_10"]
+ is_widescreen = force_widescreen or config.av.aspect.value in ("16_9", "16_10")
is_auto = config.av.aspect.value == "auto"
if is_widescreen:
if force_widescreen:
@@ -283,7 +283,7 @@ class VideoHardware:
force_widescreen = self.isWidescreenMode(port, mode)
- is_widescreen = force_widescreen or config.av.aspect.value in ["16_9", "16_10"]
+ is_widescreen = force_widescreen or config.av.aspect.value in ("16_9", "16_10")
is_auto = config.av.aspect.value == "auto"
policy2 = "policy" # use main policy
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
index 095e94c0..8f8bea09 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
@@ -165,7 +165,7 @@ class VideoWizard(WizardLanguage, Rc):
config.misc.showtestcard.value = False
def keyNumberGlobal(self, number):
- if number in [1,2,3]:
+ if number in (1,2,3):
if number == 1:
self.hw.saveMode("DVI", "720p", "multi")
elif number == 2:
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py
index 30bdf796..5a7dfd1b 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/plugin.py
@@ -52,8 +52,9 @@ class VideoSetup(Screen, ConfigListScreen):
def createSetup(self):
level = config.usage.setup_level.index
- self.list = [ ]
- self.list.append(getConfigListEntry(_("Video Output"), config.av.videoport))
+ self.list = [
+ getConfigListEntry(_("Video Output"), config.av.videoport)
+ ]
# if we have modes for this port:
if config.av.videoport.value in config.av.videomode:
@@ -76,9 +77,11 @@ class VideoSetup(Screen, ConfigListScreen):
if not force_wide:
self.list.append(getConfigListEntry(_("Aspect Ratio"), config.av.aspect))
- if force_wide or config.av.aspect.value in ["16_9", "16_10"]:
- self.list.append(getConfigListEntry(_("Display 4:3 content as"), config.av.policy_43))
- self.list.append(getConfigListEntry(_("Display >16:9 content as"), config.av.policy_169))
+ if force_wide or config.av.aspect.value in ("16_9", "16_10"):
+ self.list.extend((
+ getConfigListEntry(_("Display 4:3 content as"), config.av.policy_43),
+ getConfigListEntry(_("Display >16:9 content as"), config.av.policy_169)
+ ))
elif config.av.aspect.value == "4_3":
self.list.append(getConfigListEntry(_("Display 16:9 content as"), config.av.policy_169))