X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgui%2Felistboxcontent.cpp;h=a19e11a34f7e69cd17a8af9ec9a1d6875143b9d9;hb=0c417aee83bac3ab0a70d5e0b3360d18b3663a23;hp=43fbc5945bd3b96081591dbfb29d3e874dfcc718;hpb=45c627a80e5387e29aa9c7ca071d310cd3a7e823;p=vuplus_dvbapp diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index 43fbc59..a19e11a 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -501,6 +501,7 @@ eListboxPythonMultiContent::~eListboxPythonMultiContent() { Py_XDECREF(m_buildFunc); Py_XDECREF(m_selectableFunc); + Py_XDECREF(m_template); } void eListboxPythonMultiContent::setSelectionClip(eRect &rect, bool update) @@ -967,6 +968,9 @@ void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c if (ppixmap) { ePtr 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"); @@ -1155,5 +1159,7 @@ void eListboxPythonMultiContent::entryRemoved(int idx) void eListboxPythonMultiContent::setTemplate(ePyObject tmplate) { + Py_XDECREF(m_template); m_template = tmplate; + Py_XINCREF(m_template); }