diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-12-22 16:07:47 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-01-06 13:01:38 +0100 |
commit | 845d74476cce4ef9e640568e9adc352c0ae272f3 (patch) | |
tree | 18a5d37f3e3b987bd21ca108055c3e5c7fe7b801 /displaychannel.c | |
parent | 574edf297da422ba92c4e46737b114c24163a01f (diff) | |
download | skin-lcarsng-845d74476cce4ef9e640568e9adc352c0ae272f3.tar.gz skin-lcarsng-845d74476cce4ef9e640568e9adc352c0ae272f3.tar.bz2 |
Changed the name of an Instant Recording timer in the display channel
If a timer contains an '@' in front of the name, the timer will be named
like the recording made (as in the timer menu), previously the timer was
named after the event at the end of the recording time
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/displaychannel.c b/displaychannel.c index 2e63b48..1dc550d 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -339,6 +339,12 @@ void cLCARSNGDisplayChannel::DrawTimer(void) int x1 = xc04 + Gap + 2 + cFont::GetFont(fontSml)->Width("Do. 00.00. 00:00"); int x2 = cFont::GetFont(fontSml)->Width(" - 00:00"); if (Channel && Event) { + const char *File = Event->Title(); + if (isRecording) { + const char *recName = Timer->File(); + if (recName && *recName == '@') + File = recName; + } tColor timerColor = Theme.Color(clrEventShortText); #ifdef SWITCHONLYPATCH if (Timer->HasFlags(tfSwitchOnly)) timerColor = Theme.Color(clrSwitchTimer); @@ -347,9 +353,9 @@ void cLCARSNGDisplayChannel::DrawTimer(void) osd->DrawText(xc04, y + y1, cString::sprintf("%s", *Date), timerColor, textColorBg, cFont::GetFont(fontSml), x1 - xc04 - Gap - 1, lineHeight - Gap / 2, taRight | taBorder); if (isRecording) osd->DrawText(xc04, y + y1, cString::sprintf("Rec: #%s", *Number), Theme.Color(clrChannelSymbolRecBg), textColorBg, cFont::GetFont(fontSml), x1 - xc04 - x2 - Gap - 1, lineHeight - Gap / 2, taRight | taBorder); - int w = cFont::GetFont(fontSml)->Width(Event->Title()) + 4; // fontSml width to short + int w = cFont::GetFont(fontSml)->Width(File) + 4; // fontSml width to short osd->DrawRectangle(x1, y + y1, xc06k - 1, y + y1 + lineHeight - Gap / 2, Theme.Color(clrBackground)); - osd->DrawText(x1, y + y1, cString::sprintf("%s", Event->Title()), timerColor, textColorBg, cFont::GetFont(fontSml), min(w, xc06k - x1 - 1), lineHeight - Gap / 2, taLeft | taBorder); + osd->DrawText(x1, y + y1, cString::sprintf("%s", File), timerColor, textColorBg, cFont::GetFont(fontSml), min(w, xc06k - x1 - 1), lineHeight - Gap / 2, taLeft | taBorder); } i++; } |