diff options
author | kamel5 <kamel5 (at) gmx (dot) net> | 2018-07-05 13:33:07 +0200 |
---|---|---|
committer | kamel5 <kamel5 (at) gmx (dot) net> | 2018-07-05 13:33:07 +0200 |
commit | 212dde851dc5233fadc86a68b3a30c797d1b2c90 (patch) | |
tree | 9fd7d1c992f5a06041279136c236a0af93a8ff5d /displaychannel.c | |
parent | 0a7cbbe20242c08484290e1f3603ac34c593a721 (diff) | |
download | skin-lcarsng-212dde851dc5233fadc86a68b3a30c797d1b2c90.tar.gz skin-lcarsng-212dde851dc5233fadc86a68b3a30c797d1b2c90.tar.bz2 |
Display device number for recording in DisplayChannel
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/displaychannel.c b/displaychannel.c index 3e0702a..6a8ed12 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -286,10 +286,17 @@ void cLCARSNGDisplayChannel::DrawTimer(void) time_t Now = time(NULL); if (!(Timer->HasFlags(tfActive)) || (Timer->StopTime() < Now)) j++; - else { + else { cString Date; - if (Timer->Recording()) + cString Number; + bool isRecording = false; + if (Timer->Recording()) { + isRecording = true; + if (cRecordControl *RecordControl = cRecordControls::GetRecordControl(Timer)) + if (const cDevice *Device = RecordControl->Device()) + Number = itoa(Device->DeviceNumber() + 1); Date = cString::sprintf("- %s", *TimeString(Timer->StopTime())); + } else Date = DayDateTime(Timer->StartTime()); const cChannel *Channel = Timer->Channel(); @@ -300,6 +307,8 @@ void cLCARSNGDisplayChannel::DrawTimer(void) osd->DrawText(xc04, y + y1, cString::sprintf("%s", *Date), Theme.Color(clrEventShortText), Theme.Color(clrBackground), cFont::GetFont(fontSml), xc06a - xc04 - Gap - 1, lineHeight - 2 * y1, taRight | taBorder); osd->DrawText(xc06a, y + y1, cString::sprintf("%s", Event->Title()), Theme.Color(clrEventShortText), Theme.Color(clrBackground), cFont::GetFont(fontSml), xc06l - xc06a - Gap - 1, lineHeight - 2 * y1, taLeft | taBorder); } + if (isRecording) // && Number) + osd->DrawText(xc04, y + y1, cString::sprintf("Rec: #%s", *Number), Theme.Color(clrEventShortText), Theme.Color(clrBackground), cFont::GetFont(fontSml), xc05 - xc04 - Gap - 1, lineHeight - 2 * y1, taRight | taBorder); i++; } } |