Merge branch 'master' of git://git.opendreambox.org/git/enigma2
authorMladen Horvat <acidburn@opendreambox.org>
Tue, 17 Feb 2009 08:34:59 +0000 (09:34 +0100)
committerMladen Horvat <acidburn@opendreambox.org>
Tue, 17 Feb 2009 08:34:59 +0000 (09:34 +0100)
lib/base/estring.cpp
lib/base/estring.h
lib/gui/esubtitle.cpp
lib/gui/esubtitle.h
lib/python/Components/config.py
lib/service/event.cpp
lib/service/servicedvb.cpp

index 5d15ddce01234b3e3a70d8cfeb90d42352e1ab28..f1d50cccd34f51207f85d2b41a22c04850ed6b12 100644 (file)
@@ -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;
+}
index 68e0970f410a657ce81c78e51bf3470f4e3c132a..d61489ebe34dcc00047e355cbda3e4d7172e94d2 100644 (file)
@@ -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
 {
index 085a749a6fde71fdb0264160bc18ee161ab77de0..ca5c20d789fee53540f9b50683ded51bb6cdd591 100644 (file)
@@ -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)
index 1635e6de3ef6831148cd377aa11347e84919fa87..c88df0e689509bb1013a5a9208f04bba4e9b7f12 100644 (file)
@@ -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
index a813d3cadda77a8b5d9167a4d88f750248017658..a6d34152e0882b153ecb950270a4e6ed37d43954 100755 (executable)
@@ -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
index e78ddc4e1da2928bcd2000b5a7dc33a0528b2f56..e15eebfc979a01a7e79567f302b54fe4462c68ce 100644 (file)
@@ -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;
                                }
index 2cc9b79ff1a9cc9e5c60afa174aff249bc2ea9c2..12b75f80ad3b1be1125584a3d285e74eb740215f 100644 (file)
@@ -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);
        }