Merge branch 'pbiering/vdrstatus-displaymenu'

This commit is contained in:
kamel5 2021-05-06 10:55:25 +02:00
commit 596c86c780
6 changed files with 43 additions and 4 deletions

View File

@ -505,9 +505,10 @@ Version 1.2.15
- [kamel5] Fix cutting marks wasn't updated
Upcoming for Version 1.2.16+
- [pbiering] add additional recording flag "isInUse" - can be used in skins for e.g. records in cutting/copy(queue)
- [pbiering] add additional vdrstatus exposing "vdrIsRecordingsHandlersActive" and "vdrIsRecording" - can be used in skins for e.g. IDLE/BUSY REC/FREE
- [pbiering] add additional recording flag {isInUse} - can be used in skins for e.g. records in cutting/copy(queue)
- [pbiering] add additional <vdrstatus> exposing {vdrIsRecordingsHandlersActive} and {vdrIsRecording} - can be used in skins for e.g. IDLE/BUSY REC/FREE
- [kamel5] Fix Incorrect detection of a recording that is currently running
- [kamel5] Fix segfault with mpv plugin (thx to @lnj at vdr-portal.de)
- [kamel5] Update skin estuary4vdr
- [pbiering] add {vdrHasTimers} to vdrstatus - can be used in skins for e.g. REC/SCHED/FREE (in combination with {vdrIsRecording})
- [pbiering] add {vdrHasTimers} to <vdrstatus> - can be used in skins for e.g. REC/SCHED/FREE (in combination with {vdrIsRecording})
- [pbiering] add <vdrstatus> also to displaymenu.xml to be able to display in header

View File

@ -62,6 +62,7 @@ enum class eVeDisplayMenu {
header,
datetime,
time,
vdrstatus,
sortmode,
colorbuttons,
message,

View File

@ -108,6 +108,7 @@ void cViewMenu::SetViewElements(void) {
viewElementNames.insert(pair<string, int>("header", (int)eVeDisplayMenu::header));
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayMenu::datetime));
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayMenu::time));
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenu::vdrstatus));
viewElementNames.insert(pair<string, int>("colorbuttons", (int)eVeDisplayMenu::colorbuttons));
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayMenu::message));
viewElementNames.insert(pair<string, int>("scrollbar", (int)eVeDisplayMenu::scrollbar));
@ -629,6 +630,7 @@ cSubView::cSubView(const char *name) {
header = NULL;
datetime = NULL;
time = NULL;
vdrstatus = NULL;
message = NULL;
sortmode = NULL;
colorbuttons = NULL;
@ -693,6 +695,10 @@ void cSubView::SetViewElement(eVeDisplayMenu ve, cViewElement *viewElement) {
if (!time)
time = dynamic_cast<cVeTime*>(viewElement);
break;
case eVeDisplayMenu::vdrstatus:
if (!vdrstatus)
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElement);
break;
case eVeDisplayMenu::message:
if (!message)
message = dynamic_cast<cVeMessage*>(viewElement);
@ -735,6 +741,10 @@ void cSubView::SetViewElementHorizontal(eVeDisplayMenu ve, cViewElement *viewEle
if (!time)
time = dynamic_cast<cVeTime*>(viewElement);
break;
case eVeDisplayMenu::vdrstatus:
if (!vdrstatus)
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElement);
break;
case eVeDisplayMenu::message:
if (!message)
message = dynamic_cast<cVeMessage*>(viewElement);
@ -866,6 +876,7 @@ void cSubView::Clear(void) {
if (background) background->Hide();
if (datetime) datetime->Hide();
if (time) time->Hide();
if (vdrstatus) vdrstatus->Hide();
if (header) header->Hide();
if (colorbuttons) colorbuttons->Hide();
if (scrollbar) scrollbar->Hide();
@ -902,6 +913,11 @@ void cSubView::DrawDynamicVEs(void) {
time->Render();
}
}
if (vdrstatus) {
vdrstatus->Show();
if (vdrstatus->Parse())
vdrstatus->Render();
}
}
void cSubView::DrawList(void) {
@ -949,6 +965,11 @@ void cSubView::SetViewElementObjects(void) {
else if (viewElements[(int)eVeDisplayMenu::time])
time = dynamic_cast<cVeTime*>(viewElements[(int)eVeDisplayMenu::time]);
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenu::vdrstatus])
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElementsHorizontal[(int)eVeDisplayMenu::vdrstatus]);
else if (viewElements[(int)eVeDisplayMenu::vdrstatus])
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElements[(int)eVeDisplayMenu::vdrstatus]);
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenu::message])
message = dynamic_cast<cVeMessage*>(viewElementsHorizontal[(int)eVeDisplayMenu::message]);
else if (viewElements[(int)eVeDisplayMenu::message])
@ -986,6 +1007,7 @@ void cSubView::SetViewElements(void) {
viewElementNames.insert(pair<string, int>("background", (int)eVeDisplayMenu::background));
viewElementNames.insert(pair<string, int>("header", (int)eVeDisplayMenu::header));
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayMenu::datetime));
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenu::vdrstatus));
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayMenu::time));
viewElementNames.insert(pair<string, int>("colorbuttons", (int)eVeDisplayMenu::colorbuttons));
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayMenu::message));
@ -1625,6 +1647,11 @@ void cViewMenuDetail::DrawDynamicVEs(void) {
if (time->Parse())
time->Render();
}
if (vdrstatus) {
vdrstatus->Show();
if (vdrstatus->Parse())
vdrstatus->Render();
}
}
void cViewMenuDetail::DrawDetailedView(void) {

View File

@ -120,6 +120,7 @@ protected:
cVeDmHeader *header;
cVeDateTime *datetime;
cVeTime *time;
cVeDmVdrstatus *vdrstatus;
cVeMessage *message;
cVeDmSortmode *sortmode;
cVeDmColorbuttons *colorbuttons;

View File

@ -2,7 +2,7 @@
<!ENTITY % functions SYSTEM "functions.dtd">
<!ELEMENT displaymenu (background,header,datetime,time*,message,sortmode*,colorbuttons,scrollbar*,
<!ELEMENT displaymenu (background,header,datetime,time*,vdrstatus*,message,sortmode*,colorbuttons,scrollbar*,
menudefault,menumain*,menusetup*,menuschedules*,
menutimers*,menuchannels*,menurecordings*,
menudetailedepg,menudetailedrecording,

View File

@ -55,6 +55,15 @@
-->
<time>
</time>
<!-- Available Variables vdrstatus
{vdrIsRecordingsHandlersActive} true if active RecordingsHandlers (cut,copy,move) aka "busy"
{vdrIsRecording} true if active recording
{vdrHasTimers} true if numtimers > 0
-->
<vdrstatus>
</vdrstatus>
<!-- Available Variables sortmode:
{sortnumber} true if menu is sorted by number
{sortname} true if menu is sorted alphabetical