make local listbox styles working for text lists
[enigma2.git] / skin.py
diff --git a/skin.py b/skin.py
index cb433269a584459d0c8d1a5ad719ca32211bd9ef..3b448127c59a038dc72a2fb93583c0aa74123342 100644 (file)
--- a/skin.py
+++ b/skin.py
@@ -1,12 +1,10 @@
 import xml.dom.minidom
-from xml.dom import EMPTY_NAMESPACE
 from os import path
 
 from enigma import eSize, ePoint, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, \
        loadPNG, addFont, gRGB, eWindowStyleSkinned
 
 from Components.config import ConfigSubsection, ConfigText, config
-from Components.Element import Element
 from Components.Converter.Converter import Converter
 from Tools.Directories import resolveFilename, SCOPE_SKIN, SCOPE_SKIN_IMAGE, SCOPE_FONTS
 from Tools.Import import my_import
@@ -90,7 +88,7 @@ def collectAttributes(skinAttributes, node, skin_path_prefix=None, ignore=[]):
                # TODO: localization? as in e1?
                value = a.value.encode("utf-8")
                
-               if attrib in ["pixmap", "pointer", "seek_pointer"]:
+               if attrib in ["pixmap", "pointer", "seek_pointer", "backgroundPixmap", "selectionPixmap"]:
                        value = resolveFilename(SCOPE_SKIN_IMAGE, value, path_prefix=skin_path_prefix)
                
                if attrib not in ignore:
@@ -117,10 +115,15 @@ def applySingleAttribute(guiObject, desktop, attrib, value):
                        guiObject.setFont(parseFont(value))
                elif attrib == 'zPosition':
                        guiObject.setZPosition(int(value))
-               elif attrib == "pixmap":
+               elif attrib in ["pixmap", "backgroundPixmap", "selectionPixmap"]:
                        ptr = loadPixmap(value) # this should already have been filename-resolved.
                        desktop.makeCompatiblePixmap(ptr)
-                       guiObject.setPixmap(ptr)
+                       if attrib == "pixmap":
+                               guiObject.setPixmap(ptr)
+                       elif attrib == "backgroundPixmap":
+                               guiObject.setBackgroundPicture(ptr)
+                       elif attrib == "selectionPixmap":
+                               guiObject.setSelectionPicture(ptr)
                        # guiObject.setPixmapFromFile(value)
                elif attrib == "alphatest": # used by ePixmap
                        guiObject.setAlphatest(