- # try embedded skin
- print screen.__dict__
- if "parsedSkin" in screen.__dict__:
- myscreen = screen.parsedSkin
- elif "skin" in screen.__dict__:
- myscreen = screen.parsedSkin = xml.dom.minidom.parseString(screen.skin).childNodes[0]
+ for x in elementsWithTag(skin_default.childNodes, "screen"):
+ if x.getAttribute('name') == name:
+ myscreen = x
+ break
+
+ del skin, skin_default
+
+ # otherwise try embedded skin
+ myscreen = myscreen or getattr(screen, "parsedSkin", None)
+
+ # try uncompiled embedded skin
+ if myscreen is None and getattr(screen, "skin", None):
+ myscreen = screen.parsedSkin = xml.dom.minidom.parseString(screen.skin).childNodes[0]