X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/51550aa81c726aedfa7159af0e67f8bcd5fb8a2f..ac2878879847f965225e0f72c22ad17b513c16e6:/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
old mode 100644
new mode 100755
index 5eef8cda..18e81764
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
@@ -1,23 +1,33 @@
from Screens.Wizard import WizardSummary
from Screens.WizardLanguage import WizardLanguage
+from Screens.Rc import Rc
from VideoHardware import video_hw
-from Components.Pixmap import Pixmap, MovingPixmap
+from Components.Pixmap import Pixmap, MovingPixmap, MultiPixmap
from Components.config import config, ConfigBoolean, configfile
from Tools.Directories import resolveFilename, SCOPE_PLUGINS
+from Tools.HardwareInfo import HardwareInfo
config.misc.showtestcard = ConfigBoolean(default = False)
class VideoWizardSummary(WizardSummary):
- skin = """
-
-
-
+ skin = (
+ """
+
+
- """ #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png"))
+ """,
+ """
+
+
+
+
+
+ """)
+ #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png"))
def __init__(self, session, parent):
WizardSummary.__init__(self, session, parent)
@@ -29,7 +39,7 @@ class VideoWizardSummary(WizardSummary):
def setLCDPic(self, file):
self["pic"].instance.setPixmapFromFile(file)
-class VideoWizard(WizardLanguage):
+class VideoWizard(WizardLanguage, Rc):
skin = """
@@ -41,8 +51,9 @@ class VideoWizard(WizardLanguage):
-
+
+
""" % (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/Scart.png"))
@@ -53,12 +64,9 @@ class VideoWizard(WizardLanguage):
self.hw = video_hw
WizardLanguage.__init__(self, session, showSteps = False, showStepSlider = False)
+ Rc.__init__(self)
self["wizard"] = Pixmap()
- self["rc"] = MovingPixmap()
self["portpic"] = Pixmap()
- self["arrowdown"] = MovingPixmap()
- self["arrowup"] = MovingPixmap()
- self["arrowup2"] = MovingPixmap()
self.port = None
self.mode = None
@@ -76,11 +84,16 @@ class VideoWizard(WizardLanguage):
configfile.save()
def listInputChannels(self):
+ hw_type = HardwareInfo().get_device_name()
list = []
for port in self.hw.getPortList():
if self.hw.isPortUsed(port):
- list.append((port,port))
+ descr = port
+ if descr == 'DVI' and hw_type in ('dm500hd', 'dm800se', 'dm7020hd'):
+ descr = 'HDMI'
+ if port != "DVI-PC":
+ list.append((descr,port))
list.sort(key = lambda x: x[0])
print "listInputChannels:", list
return list
@@ -94,15 +107,19 @@ class VideoWizard(WizardLanguage):
print "input selection moved:", self.selection
self.inputSelect(self.selection)
if self["portpic"].instance is not None:
- self["portpic"].instance.setPixmapFromFile(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/" + self.selection + ".png"))
+ picname = self.selection
+ if picname == "DVI" and HardwareInfo().get_device_name() in ("dm500hd", "dm800se", "dm7020hd"):
+ picname = "HDMI"
+ self["portpic"].instance.setPixmapFromFile(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/" + picname + ".png"))
def inputSelect(self, port):
print "inputSelect:", port
modeList = self.hw.getModeList(self.selection)
print "modeList:", modeList
self.port = port
- ratesList = self.listRates(modeList[0][0])
- self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0])
+ if (len(modeList) > 0):
+ ratesList = self.listRates(modeList[0][0])
+ self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0])
def listModes(self):
list = []
@@ -125,8 +142,12 @@ class VideoWizard(WizardLanguage):
def modeSelect(self, mode):
ratesList = self.listRates(mode)
print "ratesList:", ratesList
- self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0])
-
+ if self.port == "DVI" and mode in ("720p", "1080i"):
+ self.rate = "multi"
+ self.hw.setMode(port = self.port, mode = mode, rate = "multi")
+ else:
+ self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0])
+
def listRates(self, querymode = None):
if querymode is None:
querymode = self.mode
@@ -166,7 +187,7 @@ class VideoWizard(WizardLanguage):
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: