X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/78c828aae07db0b15a66577d9230cb848fe536fa..a2fdb25ccdde65e3b545adbc1916c092582edf7d:/skin.py diff --git a/skin.py b/skin.py index 2986a447..72cef1a9 100644 --- a/skin.py +++ b/skin.py @@ -2,6 +2,7 @@ from enigma import * import xml.dom.minidom from xml.dom import EMPTY_NAMESPACE +from Tools.XMLTools import elementsWithTag colorNames = dict() @@ -17,9 +18,14 @@ dom = xml.dom.minidom.parseString( """ - - - + + + + + + + + @@ -41,17 +47,40 @@ dom = xml.dom.minidom.parseString( - - + + - + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -62,32 +91,28 @@ dom = xml.dom.minidom.parseString( - - - + + + + + + + - + - + + + + + + + + """) -# filters all elements of childNode with the specified function -# example: nodes = elementsWithTag(childNodes, lambda x: x == "bla") -def elementsWithTag(el, tag): - - # fiiixme! (works but isn't nice) - if tag.__class__ == "".__class__: - str = tag - tag = lambda x: x == str - - for x in el: - if x.nodeType != xml.dom.minidom.Element.nodeType: - continue - if tag(x.tagName): - yield x - def parsePosition(str): x, y = str.split(',') return ePoint(int(x), int(y))