aboutsummaryrefslogtreecommitdiff
path: root/skin.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-12-05 03:08:36 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-12-05 03:08:36 +0000
commit02226aee689caad4d05e65448ec7640d33e8f659 (patch)
tree4388956180ee2f705365c2c3c556d40a892d6aa7 /skin.py
parenta48bc4879c6ac4c6eb163f6bb3c0b5c0536fcee8 (diff)
downloadenigma2-02226aee689caad4d05e65448ec7640d33e8f659.tar.gz
enigma2-02226aee689caad4d05e65448ec7640d33e8f659.zip
listboxcontent: add support for pixmaps in list
Diffstat (limited to 'skin.py')
-rw-r--r--skin.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/skin.py b/skin.py
index d11cce02..520780e6 100644
--- a/skin.py
+++ b/skin.py
@@ -74,13 +74,9 @@ def applySingleAttribute(guiObject, desktop, attrib, value):
elif attrib == 'zPosition':
guiObject.setZPosition(int(value))
elif attrib == "pixmap":
- 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.setPixmapFromFile(value)
elif attrib == "alphatest": # used by ePixmap
guiObject.setAlphatest(
@@ -143,12 +139,6 @@ def applyAllAttributes(guiObject, desktop, attributes):
def loadSkin(desktop):
print "loading skin..."
- def getPNG(x):
- g = gPixmapPtr()
- loadPNG(g, x)
- g = g.grabRef()
- return g
-
skin = dom.childNodes[0]
assert skin.tagName == "skin", "root element in skin must be 'skin'!"
@@ -174,11 +164,11 @@ def loadSkin(desktop):
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
- png = getPNG(filename)
+ png = loadPNG(filename)
# adapt palette
- 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"))