add template handling to pixmap progress listboxmulticontent
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 11 Nov 2010 09:24:34 +0000 (10:24 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 11 Nov 2010 09:24:34 +0000 (10:24 +0100)
refs #539

lib/gui/elistboxcontent.cpp

index dbf9637..2eea146 100644 (file)
@@ -962,6 +962,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");