aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-02-22 01:01:44 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-02-22 01:01:44 +0000
commitbc851c60af8c44be9d5b24637ce335a8abf20401 (patch)
tree0ac984d501fa2944bca7de5485a1381c1bf60638 /lib/python/Plugins
parentfc16d1a92da577be87d04358b9dd42e34963a4ef (diff)
downloadenigma2-bc851c60af8c44be9d5b24637ce335a8abf20401.tar.gz
enigma2-bc851c60af8c44be9d5b24637ce335a8abf20401.zip
add port pictures to the video wizard
lcd pics don't work yet
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/Makefile.am3
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py1
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py45
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/lcd_DVI.pngbin0 -> 1033 bytes
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/lcd_Scart.pngbin0 -> 1088 bytes
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/lcd_YPbPr.pngbin0 -> 1052 bytes
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml2
7 files changed, 42 insertions, 9 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/Makefile.am b/lib/python/Plugins/SystemPlugins/Videomode/Makefile.am
index 412c80cd..5702a3b1 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/Makefile.am
+++ b/lib/python/Plugins/SystemPlugins/Videomode/Makefile.am
@@ -5,4 +5,5 @@ install_PYTHON = \
plugin.py \
VideoHardware.py \
VideoWizard.py \
- videowizard.xml
+ videowizard.xml \
+ *.png
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index 9defb9eb..177cbd09 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@ -153,6 +153,7 @@ class VideoHardware:
# get a list with all modes, with all rates, for a given port.
def getModeList(self, port):
+ print "getModeList for port", port
res = [ ]
for mode in self.modes[port]:
# list all rates which are completely valid
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
index 5524dfce..b4223b5f 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
@@ -1,36 +1,61 @@
-from Screens.Wizard import Wizard, wizardManager
+from Screens.Wizard import Wizard, wizardManager, WizardSummary
import sys
from VideoHardware import video_hw
from Components.Pixmap import Pixmap, MovingPixmap
from Components.config import config, ConfigBoolean, configfile
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
+from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
+from Tools.LoadPixmap import LoadPixmap
+
config.misc.showtestcard = ConfigBoolean(default = False)
+class VideoWizardSummary(WizardSummary):
+ skin = """
+ <screen position="0,0" size="132,64">
+ <widget name="text" position="6,4" size="120,42" font="Regular;14" transparent="1" />
+ <widget source="parent.list" render="Label" position="6,25" size="120,21" font="Regular;16">
+ <convert type="StringListSelection" />
+ </widget>
+ <!--widget name="pic" pixmap="%s" position="6,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/-->
+ </screen>""" #% (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/lcd_Scart.png"))
+
+ def __init__(self, session, parent):
+ WizardSummary.__init__(self, session, parent)
+ #self["pic"] = Pixmap()
+
+ def setLCDPicCallback(self):
+ self.parent.setLCDTextCallback(self.setText)
+
+ def setLCDPic(self, file):
+ self["pic"].instance.setPixmapFromFile(file)
+
class VideoWizard(Wizard):
skin = """
<screen position="0,0" size="720,576" title="Welcome..." flags="wfNoBorder" >
<widget name="text" position="153,50" size="340,270" font="Regular;23" />
- <widget source="list" render="Listbox" position="50,300" size="440,200" scrollbarMode="showOnDemand" >
+ <widget source="list" render="Listbox" position="200,300" size="290,200" scrollbarMode="showOnDemand" >
<convert type="StringList" />
</widget>
<widget name="config" position="50,300" zPosition="1" size="440,200" transparent="1" scrollbarMode="showOnDemand" />
- <widget name="stepslider" position="50,500" zPosition="1" borderWidth="2" size="440,20" backgroundColor="dark" />
<widget name="wizard" pixmap="wizard.png" position="40,50" zPosition="10" size="110,174" transparent="1" alphatest="on"/>
+ <widget name="portpic" pixmap="%s" position="50,300" zPosition="10" size="150,150" transparent="1" alphatest="on"/>
<widget name="rc" pixmap="rc.png" position="500,600" zPosition="10" size="154,475" transparent="1" alphatest="on"/>
<widget name="arrowdown" pixmap="arrowdown.png" position="0,0" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
<widget name="arrowup" pixmap="arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
<widget name="arrowup2" pixmap="arrowup.png" position="-100,-100" zPosition="11" size="37,70" transparent="1" alphatest="on"/>
- </screen>"""
+ </screen>""" % (resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/Scart.png"))
def __init__(self, session):
# FIXME anyone knows how to use relative paths from the plugin's directory?
- self.xmlfile = sys.path[0] + "/Plugins/SystemPlugins/Videomode/videowizard.xml"
+ self.xmlfile = resolveFilename(SCOPE_PLUGINS, "SystemPlugins/Videomode/videowizard.xml")
self.hw = video_hw
- Wizard.__init__(self, session, showSteps = False)
+ Wizard.__init__(self, session, showSteps = False, showStepSlider = False)
self["wizard"] = Pixmap()
self["rc"] = MovingPixmap()
+ self["portpic"] = Pixmap()
self["arrowdown"] = MovingPixmap()
self["arrowup"] = MovingPixmap()
self["arrowup2"] = MovingPixmap()
@@ -42,7 +67,7 @@ class VideoWizard(Wizard):
def createSummary(self):
print "++++++++++++***++**** VideoWizard-createSummary"
from Screens.Wizard import WizardSummary
- return WizardSummary
+ return VideoWizardSummary
def markDone(self):
pass
@@ -52,7 +77,8 @@ class VideoWizard(Wizard):
for port in self.hw.getPortList():
if self.hw.isPortUsed(port):
- list.append((port, port))
+ list.append((port,port))
+ print "listInputChannels:", list
return list
def inputSelectionMade(self, index):
@@ -63,6 +89,8 @@ class VideoWizard(Wizard):
def inputSelectionMoved(self):
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"))
def inputSelect(self, port):
print "inputSelect:", port
@@ -76,6 +104,7 @@ class VideoWizard(Wizard):
for mode in self.hw.getModeList(self.port):
if mode[0] != "PC":
list.append((mode[0], mode[0]))
+ print "modeslist:", list
return list
def modeSelectionMade(self, index):
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/lcd_DVI.png b/lib/python/Plugins/SystemPlugins/Videomode/lcd_DVI.png
new file mode 100644
index 00000000..715dbe48
--- /dev/null
+++ b/lib/python/Plugins/SystemPlugins/Videomode/lcd_DVI.png
Binary files differ
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/lcd_Scart.png b/lib/python/Plugins/SystemPlugins/Videomode/lcd_Scart.png
new file mode 100644
index 00000000..45c397de
--- /dev/null
+++ b/lib/python/Plugins/SystemPlugins/Videomode/lcd_Scart.png
Binary files differ
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/lcd_YPbPr.png b/lib/python/Plugins/SystemPlugins/Videomode/lcd_YPbPr.png
new file mode 100644
index 00000000..16f3849a
--- /dev/null
+++ b/lib/python/Plugins/SystemPlugins/Videomode/lcd_YPbPr.png
Binary files differ
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml b/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml
index 5d54b2f1..681a6633 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml
+++ b/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml
@@ -4,6 +4,7 @@
<displaytext value="Select video input" />
<list type="dynamic" source="listInputChannels" evaluation="inputSelectionMade" onselect="inputSelectionMoved" />
<code>
+self["portpic"].show()
self["arrowdown"].moveTo(557, 232, 1)
self["arrowdown"].startMoving()
self["arrowup"].moveTo(800, 232, 1)
@@ -25,6 +26,7 @@ self["arrowdown"].startMoving()
self["arrowup"].startMoving()
self["rc"].moveTo(500, 50, 1)
self["rc"].startMoving()
+self["portpic"].hide()
</code>
</step>
<step id="rateselection" nextstep="dvirateintroduction" timeout="10" timeoutaction="selectnext">