mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
added viewelement <lastrecordings> with information about 5 newest recordings in main menu
This commit is contained in:
@@ -205,6 +205,7 @@ cDisplayMenuMainView::~cDisplayMenuMainView() {
|
||||
|
||||
void cDisplayMenuMainView::DrawStaticViewElements(void) {
|
||||
DrawTimers();
|
||||
DrawLastRecordings();
|
||||
DrawDiscUsage();
|
||||
DrawTemperatures();
|
||||
DrawCurrentSchedule();
|
||||
@@ -250,6 +251,35 @@ void cDisplayMenuMainView::DrawTimers(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawLastRecordings(void) {
|
||||
if (!ExecuteViewElement(veLastRecordings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (DetachViewElement(veLastRecordings)) {
|
||||
cViewElement *viewElement = GetViewElement(veLastRecordings);
|
||||
if (!viewElement) {
|
||||
viewElement = new cViewElementLastRecordings(tmplView->GetViewElement(veLastRecordings));
|
||||
AddViewElement(veLastRecordings, viewElement);
|
||||
viewElement->Start();
|
||||
} else {
|
||||
if (!viewElement->Starting())
|
||||
viewElement->Render();
|
||||
}
|
||||
} else {
|
||||
map < string, string > stringTokens;
|
||||
map < string, int > intTokens;
|
||||
map < string, vector< map< string, string > > > recordingLoopTokens;
|
||||
vector< map< string, string > > lastRecordings;
|
||||
|
||||
SetLastRecordings(&intTokens, &stringTokens, &lastRecordings);
|
||||
recordingLoopTokens.insert(pair< string, vector< map< string, string > > >("recordings", lastRecordings));
|
||||
|
||||
ClearViewElement(veLastRecordings);
|
||||
DrawViewElement(veLastRecordings, &stringTokens, &intTokens, &recordingLoopTokens);
|
||||
}
|
||||
}
|
||||
|
||||
void cDisplayMenuMainView::DrawDiscUsage(void) {
|
||||
if (!ExecuteViewElement(veDiscUsage)) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user