summaryrefslogtreecommitdiff
path: root/libtemplate/parameter.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-08-08 11:04:15 +0200
committerlouis <louis.braun@gmx.de>2015-08-08 11:04:15 +0200
commitea758f955655ee48b0c3b0f277c21e8cbc045316 (patch)
tree1326c86deede899b6d8394c611a09831ff1858fe /libtemplate/parameter.c
parentb5c587b2567e4ac838a33363d02ad228d94b9b14 (diff)
downloadvdr-plugin-skindesigner-ea758f955655ee48b0c3b0f277c21e8cbc045316.tar.gz
vdr-plugin-skindesigner-ea758f955655ee48b0c3b0f277c21e8cbc045316.tar.bz2
implemented horizontal menus
Diffstat (limited to 'libtemplate/parameter.c')
-rw-r--r--libtemplate/parameter.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libtemplate/parameter.c b/libtemplate/parameter.c
index 21e02e1..d76cb35 100644
--- a/libtemplate/parameter.c
+++ b/libtemplate/parameter.c
@@ -291,6 +291,14 @@ void cConditionalParameter::Evaluate(map < string, int > *intTokens, map < strin
tokenTrue = true;
}
}
+ if (!tokenTrue) {
+ string value = "";
+ if (globals->GetString(cond->tokenName, value)) {
+ if (!value.compare(cond->strCompareValue)) {
+ tokenTrue = true;
+ }
+ }
+ }
} else if (cond->type == ctStringNotEquals) {
if (stringTokens) {
map < string, string >::iterator hit = stringTokens->find(cond->tokenName);
@@ -313,6 +321,14 @@ void cConditionalParameter::Evaluate(map < string, int > *intTokens, map < strin
tokenTrue = true;
}
}
+ if (!tokenTrue) {
+ string value = "";
+ if (globals->GetString(cond->tokenName, value)) {
+ if (value.find(cond->strCompareValue) != string::npos) {
+ tokenTrue = true;
+ }
+ }
+ }
} else if (cond->type == ctStringNotContains) {
if (stringTokens) {
map < string, string >::iterator hit = stringTokens->find(cond->tokenName);
@@ -472,6 +488,6 @@ string cConditionalParameter::StripWhitespaces(string value) {
void cConditionalParameter::Debug(void) {
dsyslog("skindesigner: Condition %s, Type: %s, cond is %s", value.c_str(), (type == cpAnd)?"and combination":((type == cpOr)?"or combination":"single param") , isTrue?"true":"false");
for (vector<sCondition>::iterator it = conditions.begin(); it != conditions.end(); it++) {
- dsyslog("skindesigner: cond token %s, type: %d, compareValue %d, negated: %d", it->tokenName.c_str(), it->type, it->compareValue, it->isNegated);
+ dsyslog("skindesigner: cond token %s, type: %d, compareValue %d, negated: %d, strCompareValue %s", it->tokenName.c_str(), it->type, it->compareValue, it->isNegated, it->strCompareValue.c_str());
}
} \ No newline at end of file