X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a4da9cccc2575c4bf299bde9594dad3e049ddf6a..7ea97a85b8a5bc5a6f1fb75cb2c6335644b4ebc0:/skin.py diff --git a/skin.py b/skin.py index dc01e34e..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() @@ -71,6 +72,9 @@ dom = xml.dom.minidom.parseString( + + + @@ -99,23 +103,16 @@ 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))