From 46108978fb72b40c7feeb52c2a7abbd437f8751d Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 17 Feb 2009 00:35:44 +0100 Subject: move replace_all function to base/string.h --- lib/gui/esubtitle.cpp | 9 --------- lib/gui/esubtitle.h | 1 - 2 files changed, 10 deletions(-) (limited to 'lib/gui') diff --git a/lib/gui/esubtitle.cpp b/lib/gui/esubtitle.cpp index 085a749a..ca5c20d7 100644 --- a/lib/gui/esubtitle.cpp +++ b/lib/gui/esubtitle.cpp @@ -114,15 +114,6 @@ void eSubtitleWidget::setPixmap(ePtr &pixmap, gRegion changed) invalidate(changed); } -std::string eSubtitleWidget::replace_all(const std::string &in, const std::string &entity, const std::string &symbol) -{ - std::string out = in; - std::string::size_type loc = 0; - while (( loc = out.find(entity, loc)) != std::string::npos ) - out.replace(loc, entity.length(), symbol); - return out; -} - int eSubtitleWidget::event(int event, void *data, void *data2) { switch (event) diff --git a/lib/gui/esubtitle.h b/lib/gui/esubtitle.h index 1635e6de..c88df0e6 100644 --- a/lib/gui/esubtitle.h +++ b/lib/gui/esubtitle.h @@ -58,7 +58,6 @@ private: gRegion m_visible_region; ePtr m_pixmap; // pixmap to paint on next evtPaint - std::string replace_all(const std::string &in, const std::string &entity, const std::string &symbol); }; #endif -- cgit v1.2.3 From 0abd3c974bc5f2c79948972a3f10f6c968e42016 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Thu, 19 Feb 2009 13:57:54 +0100 Subject: allow {text,pixmap}=None, without warning or error, to allow more flexible layout options --- lib/gui/elistboxcontent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/gui') diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index 44973af7..bf183f99 100644 --- 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)); + /* don't do anything if we have 'None' as string */ + if (pstring == Py_None) + continue; + const char *string = (PyString_Check(pstring)) ? PyString_AsString(pstring) : ""; 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)); + /* 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); -- cgit v1.2.3 From 5a6bde9419249a78c957093e0cc438d7c6eeb46c Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Mon, 23 Feb 2009 19:16:53 +0100 Subject: fixed compile errors with g++ 4.3 and replaced some c headers by their c++ counterparts --- lib/base/buffer.cpp | 5 +++-- lib/base/eerror.cpp | 7 ++++--- lib/base/encoding.cpp | 1 + lib/base/estring.cpp | 5 +++-- lib/driver/misc_options.cpp | 1 + lib/dvb/db.h | 4 ++-- lib/dvb/idvb.h | 4 ++-- lib/gdi/accel.cpp | 1 + lib/gdi/gpixmap.cpp | 2 ++ lib/gui/elistboxcontent.h | 2 +- 10 files changed, 20 insertions(+), 12 deletions(-) (limited to 'lib/gui') diff --git a/lib/base/buffer.cpp b/lib/base/buffer.cpp index 3a0a6a3d..5dfdfad5 100644 --- a/lib/base/buffer.cpp +++ b/lib/base/buffer.cpp @@ -1,8 +1,9 @@ #include #include -#include +#include +#include +#include #include -#include void eIOBuffer::removeblock() { diff --git a/lib/base/eerror.cpp b/lib/base/eerror.cpp index 4c4d6551..35e46e05 100644 --- a/lib/base/eerror.cpp +++ b/lib/base/eerror.cpp @@ -1,8 +1,9 @@ #include #include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/lib/base/encoding.cpp b/lib/base/encoding.cpp index 5d6617d9..45fea102 100644 --- a/lib/base/encoding.cpp +++ b/lib/base/encoding.cpp @@ -1,3 +1,4 @@ +#include #include #include diff --git a/lib/base/estring.cpp b/lib/base/estring.cpp index f1d50ccc..dcba7705 100644 --- a/lib/base/estring.cpp +++ b/lib/base/estring.cpp @@ -1,6 +1,7 @@ +#include +#include +#include #include -#include -#include #include #include #include diff --git a/lib/driver/misc_options.cpp b/lib/driver/misc_options.cpp index c567878c..43e6dad3 100644 --- a/lib/driver/misc_options.cpp +++ b/lib/driver/misc_options.cpp @@ -1,3 +1,4 @@ +#include #include #include diff --git a/lib/dvb/db.h b/lib/dvb/db.h index 55e008fb..11fb1ab1 100644 --- a/lib/dvb/db.h +++ b/lib/dvb/db.h @@ -51,11 +51,11 @@ public: RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr &parm); - RESULT addService(const eServiceReferenceDVB &service, eDVBService *service); + RESULT addService(const eServiceReferenceDVB &referenc, eDVBService *service); RESULT getService(const eServiceReferenceDVB &reference, ePtr &service); RESULT flush(); - RESULT startQuery(ePtr &query, eDVBChannelQuery *query, const eServiceReference &source); + RESULT startQuery(ePtr &query, eDVBChannelQuery *q, const eServiceReference &source); RESULT getBouquet(const eServiceReference &ref, eBouquet* &bouquet); ////// diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h index ec016d69..6dd0f903 100644 --- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -385,13 +385,13 @@ public: virtual RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr &parm)=0; - virtual RESULT addService(const eServiceReferenceDVB &service, eDVBService *service)=0; + virtual RESULT addService(const eServiceReferenceDVB &reference, eDVBService *service)=0; virtual RESULT getService(const eServiceReferenceDVB &reference, ePtr &service)=0; virtual RESULT flush()=0; virtual RESULT getBouquet(const eServiceReference &ref, eBouquet* &bouquet)=0; - virtual RESULT startQuery(ePtr &query, eDVBChannelQuery *query, const eServiceReference &source)=0; + virtual RESULT startQuery(ePtr &query, eDVBChannelQuery *q, const eServiceReference &source)=0; }; #endif // SWIG diff --git a/lib/gdi/accel.cpp b/lib/gdi/accel.cpp index 27b4abcc..d9c80e2e 100644 --- a/lib/gdi/accel.cpp +++ b/lib/gdi/accel.cpp @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/lib/gdi/gpixmap.cpp b/lib/gdi/gpixmap.cpp index 315c18d1..e01e5e43 100644 --- a/lib/gdi/gpixmap.cpp +++ b/lib/gdi/gpixmap.cpp @@ -1,3 +1,5 @@ +#include +#include #include #include #include diff --git a/lib/gui/elistboxcontent.h b/lib/gui/elistboxcontent.h index 64699013..6bb45590 100644 --- a/lib/gui/elistboxcontent.h +++ b/lib/gui/elistboxcontent.h @@ -73,7 +73,7 @@ public: void paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected); int currentCursorSelectable(); void setList(SWIG_PYOBJECT(ePyObject) list); - void setFont(int fnt, gFont *fnt); + void setFont(int fnt, gFont *font); void setBuildFunc(SWIG_PYOBJECT(ePyObject) func); void setSelectableFunc(SWIG_PYOBJECT(ePyObject) func); void setItemHeight(int height); -- cgit v1.2.3