aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMladen Horvat <acidburn@opendreambox.org>2009-02-17 09:34:59 +0100
committerMladen Horvat <acidburn@opendreambox.org>2009-02-17 09:34:59 +0100
commit87077e86dcddc99e1883a814d6c4deea0f9a953c (patch)
treeb7f803d9c500894ed312bf0b0ee9326ce64ef914
parentaaf19f7326eebbf125ec5b50d86bfac32e205ccb (diff)
parentdd76d3712ae3f422580c5462139302cfa2527dfd (diff)
downloadenigma2-87077e86dcddc99e1883a814d6c4deea0f9a953c.tar.gz
enigma2-87077e86dcddc99e1883a814d6c4deea0f9a953c.zip
Merge branch 'master' of git://git.opendreambox.org/git/enigma2
-rw-r--r--lib/base/estring.cpp9
-rw-r--r--lib/base/estring.h1
-rw-r--r--lib/gui/esubtitle.cpp9
-rw-r--r--lib/gui/esubtitle.h1
-rwxr-xr-xlib/python/Components/config.py2
-rw-r--r--lib/service/event.cpp2
-rw-r--r--lib/service/servicedvb.cpp1
7 files changed, 13 insertions, 12 deletions
diff --git a/lib/base/estring.cpp b/lib/base/estring.cpp
index 5d15ddce..f1d50ccc 100644
--- a/lib/base/estring.cpp
+++ b/lib/base/estring.cpp
@@ -633,3 +633,12 @@ void makeUpper(std::string &s)
{
std::transform(s.begin(), s.end(), s.begin(), (int(*)(int)) toupper);
}
+
+std::string 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;
+}
diff --git a/lib/base/estring.h b/lib/base/estring.h
index 68e0970f..d61489eb 100644
--- a/lib/base/estring.h
+++ b/lib/base/estring.h
@@ -18,6 +18,7 @@ int isUTF8(const std::string &string);
std::string removeDVBChars(const std::string &s);
void makeUpper(std::string &s);
+std::string replace_all(const std::string &in, const std::string &entity, const std::string &symbol);
inline std::string convertDVBUTF8(const std::string &string, int table=0, int tsidonid=0) // with default ISO8859-1/Latin1
{
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<gPixmap> &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<gPixmap> 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
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index a813d3ca..a6d34152 100755
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -1385,7 +1385,7 @@ class ConfigLocations(ConfigElement):
# nothing.
class ConfigNothing(ConfigSelection):
def __init__(self):
- ConfigSelection.__init__(self, choices = [""])
+ ConfigSelection.__init__(self, choices = [("","")])
# until here, 'saved_value' always had to be a *string*.
# now, in ConfigSubsection, and only there, saved_value
diff --git a/lib/service/event.cpp b/lib/service/event.cpp
index e78ddc4e..e15eebfc 100644
--- a/lib/service/event.cpp
+++ b/lib/service/event.cpp
@@ -88,7 +88,7 @@ bool eServiceEvent::loadLanguage(Event *evt, std::string lang, int tsidonid)
lang = cc; // use first found language
if (cc == lang)
{
- m_event_name = convertDVBUTF8(sed->getEventName(), table, tsidonid);
+ m_event_name = convertDVBUTF8(replace_all(replace_all(sed->getEventName(), "\n", " "), "\t", " "), table, tsidonid);
m_short_description = convertDVBUTF8(sed->getText(), table, tsidonid);
retval=1;
}
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index 2cc9b79f..12b75f80 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -524,6 +524,7 @@ eServiceFactoryDVB::eServiceFactoryDVB()
{
std::list<std::string> extensions;
extensions.push_back("ts");
+ extensions.push_back("trp");
sc->addServiceFactory(eServiceFactoryDVB::id, this, extensions);
}