git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
44fd8be
)
allow {text,pixmap}=None, without warning or error, to allow more flexible layout...
author
Felix Domke
<tmbinc@elitedvb.net>
Thu, 19 Feb 2009 12:57:54 +0000
(13:57 +0100)
committer
Felix Domke
<tmbinc@elitedvb.net>
Thu, 19 Feb 2009 12:57:54 +0000
(13:57 +0100)
lib/gui/elistboxcontent.cpp
patch
|
blob
|
history
diff --git
a/lib/gui/elistboxcontent.cpp
b/lib/gui/elistboxcontent.cpp
index 44973af76f81723edf616e0bda947f77b0ae2859..bf183f990ebbbf0dfc37424a716ba9778aa85944 100644
(file)
--- a/
lib/gui/elistboxcontent.cpp
+++ b/
lib/gui/elistboxcontent.cpp
@@
-779,6
+779,10
@@
void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
if (PyInt_Check(pstring) && data) /* if the string is in fact a number, it refers to the 'data' list. */
pstring = PyTuple_GetItem(data, PyInt_AsLong(pstring));
if (PyInt_Check(pstring) && data) /* if the string is in fact a number, it refers to the 'data' list. */
pstring = PyTuple_GetItem(data, PyInt_AsLong(pstring));
+ /* don't do anything if we have 'None' as string */
+ if (pstring == Py_None)
+ continue;
+
const char *string = (PyString_Check(pstring)) ? PyString_AsString(pstring) : "<not-a-string>";
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
const char *string = (PyString_Check(pstring)) ? PyString_AsString(pstring) : "<not-a-string>";
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
@@
-945,6
+949,10
@@
void eListboxPythonMultiContent::paint(gPainter &painter, eWindowStyle &style, c
if (PyInt_Check(ppixmap) && data) /* if the pixemap is in fact a number, it refers to the 'data' list. */
ppixmap = PyTuple_GetItem(data, PyInt_AsLong(ppixmap));
if (PyInt_Check(ppixmap) && data) /* if the pixemap is in fact a number, it refers to the 'data' list. */
ppixmap = PyTuple_GetItem(data, PyInt_AsLong(ppixmap));
+ /* don't do anything if we have 'None' as pixmap */
+ if (ppixmap == Py_None)
+ continue;
+
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
int width = PyInt_AsLong(pwidth);
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
int width = PyInt_AsLong(pwidth);