- for borderset in windowstyle.getiterator("borderset"):
- bsName = str(borderset.get("name"))
- for pixmap in borderset.getiterator("pixmap"):
- bpName = str(pixmap.get("pos"))
- filename = str(pixmap.get("filename"))
-
- png = loadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, filename, path_prefix=path_prefix), desktop)
- style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png)
+ for borderset in windowstyle.findall("borderset"):
+ bsName = str(borderset.attrib.get("name"))
+ for pixmap in borderset.findall("pixmap"):
+ get_attr = pixmap.attrib.get
+ bpName = get_attr("pos")
+ filename = get_attr("filename")
+ if filename and bpName:
+ png = loadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, filename, path_prefix=path_prefix), desktop)
+ style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png)