From fe019cb9e1bba281e2c402df7282c6ca39b4b222 Mon Sep 17 00:00:00 2001 From: wr61 Date: Mon, 21 Feb 2005 13:39:39 +0000 Subject: show language names in locale language git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/branches/0.1.3-wr@508 e10066b5-e1e2-0310-b819-94efdf66514b --- mg_actions.c | 3 +++ mg_db.c | 4 ++++ mg_db.h | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/mg_actions.c b/mg_actions.c index 1f80325..95f821c 100644 --- a/mg_actions.c +++ b/mg_actions.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -329,6 +330,8 @@ mgEntry::MenuName(const unsigned int idx,const string value) } else if (selection()->inCollection()) asprintf(&result,"%4d %s%s",idx,value.c_str(),ct); + else if (selection()->isLanguagelist()) + asprintf(&result,"%s%s",dgettext("iso_639",value.c_str()),ct); else asprintf(&result,"%s%s",value.c_str(),ct); return result; diff --git a/mg_db.c b/mg_db.c index 7971b7a..d196b6c 100644 --- a/mg_db.c +++ b/mg_db.c @@ -1259,6 +1259,10 @@ mgSelection::UsedBefore(mgOrder *o,const mgKeyTypes kt,unsigned int level) const return false; } +bool mgSelection::isLanguagelist() const +{ + return (order.getKeyType(0) == keyLanguage); +} bool mgSelection::isCollectionlist () const { diff --git a/mg_db.h b/mg_db.h index fd61422..a053757 100644 --- a/mg_db.h +++ b/mg_db.h @@ -476,6 +476,10 @@ class mgSelection */ bool isCollectionlist () const; +/*! \brief true if this selection currently selects a list of languages + */ + bool isLanguagelist () const; + //! \brief true if we have entered a collection bool inCollection(const string Name="") const; -- cgit v1.2.3