X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=skin.py;h=ffaa2018b0265f2aa5842efff490d8e4d5577cf3;hb=f51fb455f939496048538044c1597f2a8e14edba;hp=5706507618e2f2d056f8695a0392af1875dcdf99;hpb=98c4b5bb004e9297bffa8e1c3572572741fda933;p=vuplus_dvbapp diff --git a/skin.py b/skin.py index 5706507..ffaa201 100644 --- a/skin.py +++ b/skin.py @@ -20,7 +20,7 @@ dom = xml.dom.minidom.parseString( - + @@ -47,19 +47,27 @@ dom = xml.dom.minidom.parseString( """ """ - + - - - - - - + + + + + + + + + + + + + + @@ -71,7 +79,7 @@ dom = xml.dom.minidom.parseString( - + @@ -81,28 +89,32 @@ dom = xml.dom.minidom.parseString( - - + + - - - - - - + + + + + + + - - + + - - - + + + + + + @@ -170,7 +182,7 @@ def collectAttributes(skinAttributes, node): # TODO: localization? as in e1? value = str(a.value) - skinAttributes[attrib] = value + skinAttributes.append((attrib, value)) def applySingleAttribute(guiObject, desktop, attrib, value): # and set attributes @@ -232,7 +244,7 @@ def applySingleAttribute(guiObject, desktop, attrib, value): print "widget %s (%s) doesn't support attribute %s!" % ("", guiObject.__class__.__name__, attrib) def applyAllAttributes(guiObject, desktop, attributes): - for (attrib, value) in attributes.items(): + for (attrib, value) in attributes: applySingleAttribute(guiObject, desktop, attrib, value) def loadSkin(desktop): @@ -298,7 +310,7 @@ def readSkin(screen, skin, name, desktop): assert myscreen != None, "no skin for screen '" + name + "' found!" - screen.skinAttributes = { } + screen.skinAttributes = [ ] collectAttributes(screen.skinAttributes, myscreen) screen.additionalWidgets = [ ] @@ -312,7 +324,7 @@ def readSkin(screen, skin, name, desktop): # get corresponding gui object try: - attributes = screen[wname].skinAttributes = { } + attributes = screen[wname].skinAttributes = [ ] except: raise str("component with name '" + wname + "' was not found in skin of screen '" + name + "'!") @@ -345,7 +357,7 @@ def readSkin(screen, skin, name, desktop): else: raise str("unsupported stuff : %s" % widget.tagName) - w.skinAttributes = { } + w.skinAttributes = [ ] collectAttributes(w.skinAttributes, widget) # applyAttributes(guiObject, widget, desktop)