Fixed hide root menu from a subview template

This commit is contained in:
louis 2015-03-20 14:16:09 +01:00
parent a5e051e327
commit 9f8cd6dab5
4 changed files with 15 additions and 7 deletions

View File

@ -221,3 +221,6 @@ Version 0.3.0
- fixed colors in tvguideng timeline in nopacity darkred - fixed colors in tvguideng timeline in nopacity darkred
Version 0.3.1 Version 0.3.1
- Fixed hide root menu from a subview template

View File

@ -404,6 +404,8 @@ int cTemplateFunction::GetNumericParameter(eParamType type) {
return 0; return 0;
else if (type == ptMenuItemWidth) else if (type == ptMenuItemWidth)
return 0; return 0;
else if (type == ptHideRoot)
return 0;
return -1; return -1;
} }
return hit->second; return hit->second;
@ -1053,7 +1055,7 @@ bool cTemplateFunction::SetOverflow(string value) {
} }
bool cTemplateFunction::SetHideRoot(string value) { bool cTemplateFunction::SetHideRoot(string value) {
bool hideRoot = 0; int hideRoot = 0;
if (!value.compare("true")) if (!value.compare("true"))
hideRoot = 1; hideRoot = 1;
numericParameters.insert(pair<eParamType, int>(ptHideRoot, hideRoot)); numericParameters.insert(pair<eParamType, int>(ptHideRoot, hideRoot));
@ -1538,6 +1540,9 @@ string cTemplateFunction::GetParamName(eParamType pt) {
case ptScaleTvHeight: case ptScaleTvHeight:
name = "Scale TV Picture Height"; name = "Scale TV Picture Height";
break; break;
case ptHideRoot:
name = "Hide Root View";
break;
case ptCache: case ptCache:
name = "Cache Image"; name = "Cache Image";
break; break;

View File

@ -149,7 +149,7 @@
<drawimage condition="gt({cputemp}, 80)" imagetype="skinpart" path="tachohands/temp_81" x="{areawidth}*0.53" y="5%" width="20%" height="{areawidth}*0.2"/> <drawimage condition="gt({cputemp}, 80)" imagetype="skinpart" path="tachohands/temp_81" x="{areawidth}*0.53" y="5%" width="20%" height="{areawidth}*0.2"/>
<drawimage condition="lt({cputemp}, 81)" imagetype="skinpart" path="tachohands/temp_{cputemp}" x="{areawidth}*0.53" y="5%" width="20%" height="{areawidth}*0.2"/> <drawimage condition="lt({cputemp}, 81)" imagetype="skinpart" path="tachohands/temp_{cputemp}" x="{areawidth}*0.53" y="5%" width="20%" height="{areawidth}*0.2"/>
<drawimage condition="gt({gputemp}, 80)" imagetype="skinpart" path="tachohands/temp_81" x="{areawidth}*0.78" y="5%" width="20%" height="{areawidth}*0.2"/> <drawimage condition="gt({gputemp}, 80)" imagetype="skinpart" path="tachohands/temp_81" x="{areawidth}*0.78" y="5%" width="20%" height="{areawidth}*0.2"/>
<drawimage condition="lt({cputemp}, 81)" imagetype="skinpart" path="tachohands/temp_{gputemp}" x="{areawidth}*0.78" y="5%" width="20%" height="{areawidth}*0.2"/> <drawimage condition="lt({gputemp}, 81)" imagetype="skinpart" path="tachohands/temp_{gputemp}" x="{areawidth}*0.78" y="5%" width="20%" height="{areawidth}*0.2"/>
</area> </area>
<area x="77%" y="51%" width="11%" height="19%" layer="4"> <area x="77%" y="51%" width="11%" height="19%" layer="4">
<drawtext align="center" y="85%" font="{regular}" fontsize="15%" color="{clrWhite}" text="CPU Temp: {cputemp}°C" /> <drawtext align="center" y="85%" font="{regular}" fontsize="15%" color="{clrWhite}" text="CPU Temp: {cputemp}°C" />

View File

@ -34,11 +34,11 @@ bool cDisplayPluginView::createOsd(void) {
void cDisplayPluginView::Deactivate(bool hide) { void cDisplayPluginView::Deactivate(bool hide) {
Stop(); Stop();
if (!hide) { bool hideFromTemplate = tmplView->HideView();
bool hideFromTemplate = tmplView->HideView(); if (!hide && !hideFromTemplate)
if (!hideFromTemplate) return;
return; if (tvScaled) {
esyslog("skindesigner: hiding from template"); cDevice::PrimaryDevice()->ScaleVideo(cRect::Null);
} }
HidePixmaps(); HidePixmaps();
for (map< int, cViewGrid* >::iterator it = viewGrids.begin(); it != viewGrids.end(); it++) { for (map< int, cViewGrid* >::iterator it = viewGrids.begin(); it != viewGrids.end(); it++) {