{
Py_XDECREF(m_buildFunc);
Py_XDECREF(m_selectableFunc);
+ Py_XDECREF(m_template);
}
void eListboxPythonMultiContent::setSelectionClip(eRect &rect, bool update)
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);
}
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");
void eListboxPythonMultiContent::setTemplate(ePyObject tmplate)
{
+ Py_XDECREF(m_template);
m_template = tmplate;
+ Py_XINCREF(m_template);
}