From: Andreas Monzner Date: Tue, 21 Mar 2006 09:35:01 +0000 (+0000) Subject: add function to set epg language X-Git-Tag: 2.6.0~3797 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/43eacf2ca5189458bd43ca947242ec3b3bc5a5f4?hp=0f281025475d23b6c41b405b94f305b7ead78279 add function to set epg language --- diff --git a/lib/service/event.cpp b/lib/service/event.cpp index 2d0f83a4..07c92c52 100644 --- a/lib/service/event.cpp +++ b/lib/service/event.cpp @@ -10,6 +10,15 @@ #include #include +// static members / methods +std::string eServiceEvent::m_language = "de_DE"; + +void eServiceEvent::setEPGLanguage( const std::string language ) +{ + m_language = language; +} +/////////////////////////// + DEFINE_REF(eServiceEvent); DEFINE_REF(eComponentData); @@ -165,9 +174,8 @@ RESULT eServiceEvent::parseFrom(Event *evt, int tsidonid) ); m_event_id = evt->getEventId(); m_duration = fromBCD(duration>>16)*3600+fromBCD(duration>>8)*60+fromBCD(duration); - std::string country="de_DE"; // TODO use local data here for (int i=0; i < MAX_LANG; i++) - if (country==ISOtbl[i][0]) + if (m_language==ISOtbl[i][0]) if (loadLanguage(evt, ISOtbl[i][1], tsidonid)) return 0; if (loadLanguage(evt, "eng", tsidonid)) diff --git a/lib/service/event.h b/lib/service/event.h index 9ee6538b..285a4ae3 100644 --- a/lib/service/event.h +++ b/lib/service/event.h @@ -39,11 +39,13 @@ class eServiceEvent: public iObject int m_duration; int m_event_id; std::string m_event_name, m_short_description, m_extended_description; + static std::string m_language; // .. additional info public: #ifndef SWIG RESULT parseFrom(Event *evt, int tsidonid=0); #endif + static void setEPGLanguage( const std::string language ); time_t getBeginTime() const { return m_begin; } int getDuration() const { return m_duration; } int getEventId() const { return m_event_id; }