diff options
author | lordjaxom <lordjaxom> | 2005-01-01 23:44:36 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2005-01-01 23:44:36 +0000 |
commit | 4e0b98bf0cca1afa86b8c655c490392a70b56b36 (patch) | |
tree | 3bd0c33e090c67cbf948c9336317e4fdb175d9fa /xml/skin.c | |
parent | 929d806fbc6c2d05317cd7357861d371a29c290f (diff) | |
download | vdr-plugin-text2skin-4e0b98bf0cca1afa86b8c655c490392a70b56b36.tar.gz vdr-plugin-text2skin-4e0b98bf0cca1afa86b8c655c490392a70b56b36.tar.bz2 |
- some formatting issues
- moved translation to skin object
Diffstat (limited to 'xml/skin.c')
-rw-r--r-- | xml/skin.c | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -1,18 +1,23 @@ /* - * $Id: skin.c,v 1.2 2004/12/21 18:35:54 lordjaxom Exp $ + * $Id: skin.c,v 1.3 2005/01/01 23:44:36 lordjaxom Exp $ */ #include "xml/skin.h" +#include "i18n.h" #include <vdr/tools.h> #include <vdr/config.h> const std::string ScreenBases[] = { "relative", "absolute" }; -cxSkin::cxSkin(const std::string &Name): - mName(Name) { +cxSkin::cxSkin(const std::string &Name, cText2SkinI18n *I18n, cText2SkinTheme *Theme): + mName(Name), + mI18n(I18n), + mTheme(Theme) +{ } -void cxSkin::SetBase(eScreenBase Base) { +void cxSkin::SetBase(eScreenBase Base) +{ if (Base != (eScreenBase)-1) mBase = Base; @@ -32,7 +37,8 @@ void cxSkin::SetBase(eScreenBase Base) { } } -bool cxSkin::ParseBase(const std::string &Text) { +bool cxSkin::ParseBase(const std::string &Text) +{ int i; for (i = 0; i < (int)__COUNT_BASE__; ++i) { if (ScreenBases[i] == Text) @@ -44,3 +50,10 @@ bool cxSkin::ParseBase(const std::string &Text) { } return false; } + +std::string cxSkin::Translate(const std::string &Text) +{ + if (mI18n != NULL) + return mI18n->Translate(Text); + return Text; +} |