X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9a1eb9bbf5d26648c761459ec7019f9c6eae24d7..8eb03b9a607269d101bf67c7734cf3fb5346ccf5:/skin.py diff --git a/skin.py b/skin.py index 1fa565f2..3f5cd26e 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,16 +18,21 @@ dom = xml.dom.minidom.parseString( """ - - - + + + + + + + + - + @@ -41,20 +47,40 @@ dom = xml.dom.minidom.parseString( - - + + - + + + + + + + + + + + + + + + + + + + + + - + @@ -65,31 +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))