in TemplatedMultiContent Lists, use the default skin color if color tuple element...
[vuplus_dvbapp] / lib / gui / elistboxcontent.cpp
index 43fbc59..1dc4f48 100644 (file)
@@ -640,7 +640,8 @@ static ePyObject lookupColor(ePyObject color, ePyObject data)
        if ((icolor & 0xFF000000) == 0xFF000000)
        {
                int index = icolor & 0xFFFFFF;
-               eDebug("[eListboxPythonMultiContent] template color index: %d", index);
+               if (PyTuple_GetItem(data, index) == Py_None)
+                       return ePyObject();
                return PyTuple_GetItem(data, index);
        }
 
@@ -967,6 +968,9 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
                                if (ppixmap)
                                {
                                        ePtr<gPixmap> pixmap;
+                                       if (PyInt_Check(ppixmap) && data) /* if the pixmap is in fact a number, it refers to the data list */
+                                               ppixmap = PyTuple_GetItem(data, PyInt_AsLong(ppixmap));
+
                                        if (SwigFromPython(pixmap, ppixmap))
                                        {
                                                eDebug("eListboxPythonMultiContent (Pixmap) get pixmap failed");