- ptr = gPixmapPtr()
- if loadPNG(ptr, value):
- raise "loading PNG failed!"
- x = ptr
- ptr = ptr.__deref__()
- desktop.makeCompatiblePixmap(ptr)
- guiObject.setPixmap(ptr)
+ ptr = loadPNG(value)
+ desktop.makeCompatiblePixmap(ptr.__deref__())
+ guiObject.setPixmap(ptr.__deref__())
guiObject.setBackgroundColor(parseColor(value))
elif attrib == "foregroundColor":
guiObject.setForegroundColor(parseColor(value))
guiObject.setBackgroundColor(parseColor(value))
elif attrib == "foregroundColor":
guiObject.setForegroundColor(parseColor(value))
for windowstyle in elementsWithTag(skin.childNodes, "windowstyle"):
style = eWindowStyleSkinned()
for windowstyle in elementsWithTag(skin.childNodes, "windowstyle"):
style = eWindowStyleSkinned()
for borderset in elementsWithTag(windowstyle.childNodes, "borderset"):
bsName = str(borderset.getAttribute("name"))
for pixmap in elementsWithTag(borderset.childNodes, "pixmap"):
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
for borderset in elementsWithTag(windowstyle.childNodes, "borderset"):
bsName = str(borderset.getAttribute("name"))
for pixmap in elementsWithTag(borderset.childNodes, "pixmap"):
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
- desktop.makeCompatiblePixmap(png)
- style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png)
+ desktop.makeCompatiblePixmap(png.__deref__())
+ style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png.__deref__())
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))
- assert myscreen != None, "no skin for screen '" + name + "' found!"
+ if myscreen is None:
+ # 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]
+
+ assert myscreen is not None, "no skin for screen '" + name + "' found!"
screen.skinAttributes = [ ]
collectAttributes(screen.skinAttributes, myscreen)
screen.skinAttributes = [ ]
collectAttributes(screen.skinAttributes, myscreen)