summaryrefslogtreecommitdiff
path: root/libtemplate/templatefunction.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtemplate/templatefunction.c')
-rw-r--r--libtemplate/templatefunction.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c
index 8156633..cae9124 100644
--- a/libtemplate/templatefunction.c
+++ b/libtemplate/templatefunction.c
@@ -125,6 +125,8 @@ void cTemplateFunction::SetParameters(vector<pair<string, string> > params) {
p.first = ptScaleTvWidth;
} else if (!name.compare("scaletvheight")) {
p.first = ptScaleTvHeight;
+ } else if (!name.compare("hideroot")) {
+ p.first = ptHideRoot;
} else if (!name.compare("cache")) {
p.first = ptCache;
} else if (!name.compare("determinatefont")) {
@@ -260,6 +262,10 @@ bool cTemplateFunction::CalculateParameters(void) {
break;
case ptOverflow:
paramValid = SetOverflow(value);
+ break;
+ case ptHideRoot:
+ paramValid = SetHideRoot(value);
+ break;
default:
paramValid = true;
break;
@@ -1046,6 +1052,14 @@ bool cTemplateFunction::SetOverflow(string value) {
return ok;
}
+bool cTemplateFunction::SetHideRoot(string value) {
+ bool hideRoot = 0;
+ if (!value.compare("true"))
+ hideRoot = 1;
+ numericParameters.insert(pair<eParamType, int>(ptHideRoot, hideRoot));
+ return true;
+}
+
void cTemplateFunction::ParseStringParameters(void) {
//first replace stringtokens in Text (drawText)
stringstream text;