diff --git a/coreengine/area.c b/coreengine/area.c index 8f65499..ca5ae25 100644 --- a/coreengine/area.c +++ b/coreengine/area.c @@ -246,8 +246,8 @@ void cArea::Close(void) { init = true; } -void cArea::Clear(void) { - if (!init && isBackgroundArea) { +void cArea::Clear(bool forceClearBackground) { + if (!init && isBackgroundArea && !forceClearBackground) { return; } StopBlinkers(); @@ -685,9 +685,9 @@ void cAreaContainer::Close(void) { } } -void cAreaContainer::Clear(void) { +void cAreaContainer::Clear(bool forceClearBackground) { for (cArea *area = areas.First(); area; area = areas.Next(area)) { - area->Clear(); + area->Clear(forceClearBackground); } } diff --git a/coreengine/area.h b/coreengine/area.h index 305ca2f..3f29742 100644 --- a/coreengine/area.h +++ b/coreengine/area.h @@ -44,7 +44,7 @@ public: virtual void Cache(void) {}; virtual void Close(void) {}; virtual void StopBlinkers(void) {}; - virtual void Clear(void) {}; + virtual void Clear(bool forceClearBackground = false) {}; virtual void Hide(void) {}; virtual void Show(void) {}; virtual void Render(void) {}; @@ -104,7 +104,7 @@ public: void Cache(void); int GetWidth(void) { return attribs->Width(); }; void Close(void); - void Clear(void); + void Clear(bool forceClearBackground = false); void Hide(void); void Show(void); void Render(void); @@ -162,7 +162,7 @@ public: void SetHeight(int height); void Cache(void); void Close(void); - void Clear(void); + void Clear(bool forceClearBackground = false); void Hide(void); void Show(void); void Render(void); diff --git a/coreengine/listelements.c b/coreengine/listelements.c index b9fd0c8..6a3b525 100644 --- a/coreengine/listelements.c +++ b/coreengine/listelements.c @@ -39,11 +39,11 @@ void cListElement::Close(void) { dirty = false; } -void cListElement::Clear(void) { +void cListElement::Clear(bool forceClearBackground) { if (current && currentElement) { currentElement->Close(); } - cViewElement::Clear(); + cViewElement::Clear(forceClearBackground); dirty = false; } @@ -318,7 +318,7 @@ void cLeMenuDefault::CheckProgressBar(const char *text, int tab) { tokenContainer->AddIntToken(32 + tab, len); } -void cLeMenuDefault::Clear(void) { +void cLeMenuDefault::Clear(bool forceClearBackground) { if (current && currentElement) { currentElement->Close(); } diff --git a/coreengine/listelements.h b/coreengine/listelements.h index d3dfc84..6c8a0fb 100644 --- a/coreengine/listelements.h +++ b/coreengine/listelements.h @@ -30,7 +30,7 @@ public: bool DoScroll(void) { return current; }; virtual void RenderCurrent(void) { }; void Close(void); - virtual void Clear(void); + virtual void Clear(bool forceClearBackground = false); }; /****************************************************************** @@ -70,7 +70,7 @@ public: void SetPlugin(const char *plugName) { this->plugName = plugName; }; void SetTokenContainer(void); bool Parse(bool forced = true); - void Clear(void); + void Clear(bool forceClearBackground = false); }; /****************************************************************** diff --git a/coreengine/view.c b/coreengine/view.c index 0a323bc..fbaac4f 100644 --- a/coreengine/view.c +++ b/coreengine/view.c @@ -201,10 +201,10 @@ bool cView::Init(void) { return sdOsd.CreateOsd(osdX, osdY, osdWidth, osdHeight); } -void cView::Clear(int ve) { +void cView::Clear(int ve, bool forceClearBackground) { if (!viewElements[ve]) return; - viewElements[ve]->Clear(); + viewElements[ve]->Clear(forceClearBackground); } void cView::Render(int ve, bool force) { diff --git a/coreengine/view.h b/coreengine/view.h index b6ee0e6..239c429 100644 --- a/coreengine/view.h +++ b/coreengine/view.h @@ -74,7 +74,7 @@ public: virtual int GetListWidth(void) { return 0; }; //View API virtual bool Init(void); - void Clear(int ve); + void Clear(int ve, bool forceClearBackground = false); void Render(int ve, bool force = false); virtual void Close(void); virtual void Flush(void); diff --git a/coreengine/viewdetail.c b/coreengine/viewdetail.c index 4206a40..2999b00 100644 --- a/coreengine/viewdetail.c +++ b/coreengine/viewdetail.c @@ -37,7 +37,7 @@ void cViewDetail::ResetTabs(void) { activeTabIndex = -1; } -void cViewDetail::Clear(void) { +void cViewDetail::Clear(bool forceClearBackground) { cViewElement::Close(); } diff --git a/coreengine/viewdetail.h b/coreengine/viewdetail.h index e68d647..0d53a5a 100644 --- a/coreengine/viewdetail.h +++ b/coreengine/viewdetail.h @@ -22,7 +22,7 @@ public: void SetPlugMenuId(int id) { plugMenuId = id; }; int GetWidth(void); void ResetTabs(void); - void Clear(void); + void Clear(bool forceClearBackground = false); void Close(void); void Render(void); void Scrollbar(int &barheight, int &offset, bool &end); diff --git a/coreengine/viewdisplaychannel.c b/coreengine/viewdisplaychannel.c index ba05ba6..a6ae3d5 100644 --- a/coreengine/viewdisplaychannel.c +++ b/coreengine/viewdisplaychannel.c @@ -123,16 +123,16 @@ void cViewChannel::SetChannel(const cChannel *channel, int number) { veEcmInfo->Set(channel); } else { displayChannelGroups = true; - Clear((int)eVeDisplayChannel::channelinfo); - Clear((int)eVeDisplayChannel::epginfo); - Clear((int)eVeDisplayChannel::statusinfo); - Clear((int)eVeDisplayChannel::progressbar); - Clear((int)eVeDisplayChannel::screenresolution); - Clear((int)eVeDisplayChannel::signalquality); - Clear((int)eVeDisplayChannel::audioinfo); - Clear((int)eVeDisplayChannel::ecminfo); - Clear((int)eVeDisplayChannel::devices); - Clear((int)eVeDisplayChannel::customtokens); + Clear((int)eVeDisplayChannel::channelinfo, true); + Clear((int)eVeDisplayChannel::epginfo, true); + Clear((int)eVeDisplayChannel::statusinfo, true); + Clear((int)eVeDisplayChannel::progressbar, true); + Clear((int)eVeDisplayChannel::screenresolution, true); + Clear((int)eVeDisplayChannel::signalquality, true); + Clear((int)eVeDisplayChannel::audioinfo, true); + Clear((int)eVeDisplayChannel::ecminfo, true); + Clear((int)eVeDisplayChannel::devices, true); + Clear((int)eVeDisplayChannel::customtokens, true); if (veChannelGroup) veChannelGroup->Set(channel); } @@ -169,7 +169,6 @@ void cViewChannel::Flush(void) { if (init) { sdOsd.LockFlush(); Render((int)eVeDisplayChannel::background); - Render((int)eVeDisplayChannel::progressbar); Render((int)eVeDisplayChannel::currentweather); } diff --git a/coreengine/viewelement.c b/coreengine/viewelement.c index 340bd84..466f8cb 100644 --- a/coreengine/viewelement.c +++ b/coreengine/viewelement.c @@ -265,12 +265,12 @@ bool cViewElement::Execute(void) { return attribs->DoExecute(); } -void cViewElement::Clear(void) { +void cViewElement::Clear(bool forceClearBackground) { tokenContainer->Clear(); for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) { node->StopBlinkers(); sdOsd->Lock(); - node->Clear(); + node->Clear(forceClearBackground); sdOsd->Unlock(); } dirty = false; diff --git a/coreengine/viewelement.h b/coreengine/viewelement.h index dedbcbf..99950b3 100644 --- a/coreengine/viewelement.h +++ b/coreengine/viewelement.h @@ -62,7 +62,7 @@ public: void Cache(void); virtual void Close(void); void StopBlinking(void); - virtual void Clear(void); + virtual void Clear(bool forceClearBackground = false); void Hide(void); void Show(void); void WakeUp(void);