X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/8a7fd294aeb67932e1057bf967958bbe5a959cfb..11b08a91409fb5902b56d3106760d51e21fcf0e0:/skin.py diff --git a/skin.py b/skin.py index 2e913a08..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,17 +47,40 @@ dom = xml.dom.minidom.parseString( - - + + - + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -62,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))