diff options
author | louis <louis.braun@gmx.de> | 2013-03-23 11:59:38 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-03-23 11:59:38 +0100 |
commit | f59b6092b1eb5aa6b76dede334b25903a2f2026a (patch) | |
tree | 952e435826f079308592d87de7d7e7c5384d80a1 /displaychannel.c | |
parent | 1079718362567290fd53d545710f750e83b26a00 (diff) | |
download | skin-nopacity-f59b6092b1eb5aa6b76dede334b25903a2f2026a.tar.gz skin-nopacity-f59b6092b1eb5aa6b76dede334b25903a2f2026a.tar.bz2 |
time display for current schedule in channel display configurable (elapsed / remaining)
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/displaychannel.c b/displaychannel.c index 938e8d0..4a8994c 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -429,8 +429,13 @@ void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fol int epgWidthShort = fontEPGSmall->Width(e->ShortText()); cString strSeen(""); if (i==0) { - int seen = (int)(time(NULL) - e->StartTime())/60; - strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60); + if (config.progressCurrentSchedule == 0) { + int seen = (int)(time(NULL) - e->StartTime())/60; + strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60); + } else if (config.progressCurrentSchedule == 1) { + int remaining = (int)(e->EndTime() - time(NULL))/60; + strSeen = cString::sprintf("-%d/%dmin", remaining, e->Duration()/60); + } } else { strSeen = cString::sprintf("%dmin", e->Duration()/60); } @@ -482,7 +487,6 @@ void cNopacityDisplayChannel::DrawProgressBar(int Current, int Total) { if (Current > 0) { tColor colAct = DrawProgressbarBackground(10 + barHeight/2, 4, barFullWidth * percentSeen, barHeight-1); pixmapProgressBar->DrawEllipse(cRect(10 + barFullWidth * percentSeen, 4, barHeight, barHeight), colAct); - //pixmapProgressBar->DrawRectangle(cRect( 10 + barHeight/2, 4, barFullWidth * percentSeen, barHeight-1), Theme.Color(clrProgressBar)); } } } |