aboutsummaryrefslogtreecommitdiff
path: root/skin.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-02-07 09:14:02 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-02-07 09:14:02 +0000
commitd9ee52e4f0fbe9a1ae00d0e66f9e6f0a07fa319f (patch)
treef1084b85919b5590615e281331cfe535c3a160c8 /skin.py
parent4bc08995411e21f3564f09e136809be68ddf96a8 (diff)
downloadenigma2-d9ee52e4f0fbe9a1ae00d0e66f9e6f0a07fa319f.tar.gz
enigma2-d9ee52e4f0fbe9a1ae00d0e66f9e6f0a07fa319f.zip
- added iStaticServiceInformation
- added service list interface for dvb - started work on queries (currently only "instr" on servicename) - started work on infobar - added listbox with service - fixed dvbdb - remove some debug output
Diffstat (limited to 'skin.py')
-rw-r--r--skin.py33
1 files changed, 23 insertions, 10 deletions
diff --git a/skin.py b/skin.py
index 9fbdfeb4..687d8085 100644
--- a/skin.py
+++ b/skin.py
@@ -13,7 +13,7 @@ def dump(x, i=0):
dom = xml.dom.minidom.parseString(
"""
<skin>
- <screen name="testDialog">
+ <screen name="mainMenu" position="300,100" size="300,300" title="real main menu">
<widget name="okbutton" position="10,190" size="280,50" />
<widget name="title" position="10,10" size="280,20" />
<widget name="menu" position="10,30" size="280,140" />
@@ -23,9 +23,12 @@ dom = xml.dom.minidom.parseString(
<widget name="title" position="10,120" size="280,50" />
<widget name="theClock" position="10,60" size="280,50" />
</screen>
- <screen name="mainMenu" position="300,100" size="300,300">
- <widget name="title" position="10,10" size="280,80" />
+ <screen name="infoBar" position="100,100" size="500,400" title="InfoBar">
+ <widget name="channelSwitcher" position="10,190" size="280,50" />
+ </screen>
+ <screen name="channelSelection" position="300,100" size="300,300" title="Channel Selection">
<widget name="okbutton" position="10,190" size="280,50" />
+ <widget name="list" position="10,30" size="280,140" />
</screen>
</skin>
""")
@@ -45,15 +48,23 @@ def applyAttributes(guiObject, node):
for p in range(node.attributes.length):
a = node.attributes.item(p)
+ # convert to string (was: unicode)
+ attrib = str(a.name)
+ # TODO: proper UTF8 translation?! (for value)
+ # TODO: localization? as in e1?
+ value = str(a.value)
+
# and set attributes
- if a.name == 'position':
- guiObject.move(parsePosition(a.value))
- elif a.name == 'size':
- guiObject.resize(parseSize(a.value))
- elif a.name != 'name':
- print "unsupported attribute " + a.name
+ if attrib == 'position':
+ guiObject.move(parsePosition(value))
+ elif attrib == 'size':
+ guiObject.resize(parseSize(value))
+ elif attrib == 'title':
+ guiObject.setTitle(value)
+ elif attrib != 'name':
+ print "unsupported attribute " + attrib + "=" + value
-def applyGUIskin(screen, skin, name):
+def applyGUIskin(screen, parent, skin, name):
myscreen = None
@@ -67,6 +78,8 @@ def applyGUIskin(screen, skin, name):
assert myscreen != None, "no skin for screen '" + name + "' found!"
+ applyAttributes(parent, myscreen)
+
# now walk all widgets
for widget in myscreen.getElementsByTagName("widget"):
wname = widget.getAttribute('name')