X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f46f0bbfd9d9cdcd667b79904ad9ee844e2f4ba0..dd0fac7b6b44da564697c09e7f03e1f678c8f90d:/skin.py
diff --git a/skin.py b/skin.py
index 9de0a722..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,12 +72,15 @@ dom = xml.dom.minidom.parseString(
+
+
+
-
+
@@ -87,7 +91,7 @@ dom = xml.dom.minidom.parseString(
-
+
@@ -95,27 +99,20 @@ 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))