From 39c1062353995e61639b5bd8505fce58196611c2 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Tue, 4 May 2021 07:33:08 +0200 Subject: add {vdrHasTimers} to vdrstatus - can be used in skins for e.g. REC/SCHED/FREE (in combination with {vdrIsRecording}) --- coreengine/viewelementsdisplaymenu.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'coreengine/viewelementsdisplaymenu.c') diff --git a/coreengine/viewelementsdisplaymenu.c b/coreengine/viewelementsdisplaymenu.c index d1312d8..1640be1 100644 --- a/coreengine/viewelementsdisplaymenu.c +++ b/coreengine/viewelementsdisplaymenu.c @@ -883,6 +883,7 @@ void cVeDmVdrstatus::SetTokenContainer(void) { tokenContainer = new skindesignerapi::cTokenContainer(); tokenContainer->DefineIntToken("{vdrIsRecordingsHandlersActive}", (int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive); tokenContainer->DefineIntToken("{vdrIsRecording}", (int)eDMVdrstatusIT::vdrIsRecording); + tokenContainer->DefineIntToken("{vdrHasTimers}", (int)eDMVdrstatusIT::vdrHasTimers); InheritTokenContainer(); } @@ -890,9 +891,13 @@ bool cVeDmVdrstatus::Parse(bool forced) { if (!cViewElement::Parse(forced)) return false; + cGlobalTimers globalTimers; + globalTimers.LoadTimers(); + tokenContainer->Clear(); tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive, RecordingsHandler.Active()); tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecording, cRecordControls::Active()); + tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrHasTimers, (globalTimers.Size() > 0)); SetDirty(); return true; } -- cgit v1.2.3