diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-08-11 12:39:06 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-08-11 12:39:06 +0200 |
commit | 0f7a4af1683abfe892cb6d05536818a964d8cfe6 (patch) | |
tree | 13bb325aa8f5b390db1227c7875b0e406a43efec /themes.c | |
parent | 5b8fe34a0e8398a901eebe42c9385622d9bd7a22 (diff) | |
download | vdr-0f7a4af1683abfe892cb6d05536818a964d8cfe6.tar.gz vdr-0f7a4af1683abfe892cb6d05536818a964d8cfe6.tar.bz2 |
Switched I18N to gettext
Diffstat (limited to 'themes.c')
-rw-r--r-- | themes.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: themes.c 1.6 2005/11/04 14:19:54 kls Exp $ + * $Id: themes.c 1.7 2007/08/05 14:11:35 kls Exp $ */ #include "themes.h" @@ -18,7 +18,6 @@ cTheme::cTheme(void) { name = strdup("default"); - memset(descriptions, 0, sizeof(descriptions)); memset(colorNames, 0, sizeof(colorNames)); memset(colorValues, 0, sizeof(colorValues)); descriptions[0] = strdup("Default"); @@ -27,8 +26,6 @@ cTheme::cTheme(void) cTheme::~cTheme() { free(name); - for (int i = 0; i < I18nNumLanguages; i++) - free(descriptions[i]); for (int i = 0; i < MaxThemeColors; i++) free(colorNames[i]); } @@ -77,7 +74,7 @@ bool cTheme::FileNameOk(const char *FileName, bool SetName) const char *cTheme::Description(void) { - char *s = descriptions[Setup.OSDLanguage]; + char *s = descriptions[I18nCurrentLanguage()]; if (!s) s = descriptions[0]; return s ? s : name; @@ -167,7 +164,7 @@ bool cTheme::Save(const char *FileName) bool result = true; cSafeFile f(FileName); if (f.Open()) { - for (int i = 0; i < I18nNumLanguages; i++) { + for (int i = 0; i < I18nLanguages()->Size(); i++) { if (descriptions[i]) fprintf(f, "Description%s%.*s = %s\n", i ? "." : "", 3, i ? I18nLanguageCode(i) : "", descriptions[i]); } |