diff options
author | louis <louis.braun@gmx.de> | 2015-01-24 10:47:47 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-01-24 10:47:47 +0100 |
commit | a74cb93163146e547abc641638874697904672e5 (patch) | |
tree | 5ade879d4ad7808cfb8eca6ad2bd40636a4fa22b /libcore | |
parent | 5733a499407a11b095887e06df09c4e5d6debeda (diff) | |
download | vdr-plugin-skindesigner-a74cb93163146e547abc641638874697904672e5.tar.gz vdr-plugin-skindesigner-a74cb93163146e547abc641638874697904672e5.tar.bz2 |
introduced globals.xml in skinpath, theme.xml in theme path
Diffstat (limited to 'libcore')
-rw-r--r-- | libcore/helpers.c | 6 | ||||
-rw-r--r-- | libcore/helpers.h | 1 | ||||
-rw-r--r-- | libcore/skinsetup.c | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/libcore/helpers.c b/libcore/helpers.c index 4da97f7..3e08e11 100644 --- a/libcore/helpers.c +++ b/libcore/helpers.c @@ -90,6 +90,12 @@ bool isNumber(const string& s) { return !s.empty() && it == s.end(); } +bool IsToken(const string& token) { + if ((token.find("{") == 0) && (token.find("}") == (token.size()-1))) + return true; + return false; +} + bool FileExists(const string &fullpath) { struct stat buffer; return (stat (fullpath.c_str(), &buffer) == 0); diff --git a/libcore/helpers.h b/libcore/helpers.h index abfae6d..cfcd70d 100644 --- a/libcore/helpers.h +++ b/libcore/helpers.h @@ -12,6 +12,7 @@ int Minimum(int a, int b, int c, int d, int e, int f); std::string CutText(string &text, int width, string fontName, int fontSize); std::string StrToLowerCase(string str); bool isNumber(const string& s); +bool IsToken(const string& token); bool FileExists(const string &fullpath); bool FileExists(const string &path, const string &name, const string &ext); bool FolderExists(const string &path); diff --git a/libcore/skinsetup.c b/libcore/skinsetup.c index ceeb687..d678243 100644 --- a/libcore/skinsetup.c +++ b/libcore/skinsetup.c @@ -102,8 +102,7 @@ void cSkinSetup::AddToGlobals(cGlobals *globals) { return; for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) { cSkinSetupParameter *param = p->second; - globals->intVars.erase(param->name); - globals->intVars.insert(pair<string,int>(param->name, param->value)); + globals->AddInt(param->name, param->value); } } |