summaryrefslogtreecommitdiff
path: root/watch.c
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2009-05-30 15:20:13 +0200
committeranbr <vdr07@deltab.de>2009-05-30 15:20:13 +0200
commite35905da3b8f38ef246df5316f56ae623fd3f1db (patch)
tree654c1b787662e6a47607ea7b70133f43a6270ced /watch.c
parentc1321723e80c9bf20e27be5e670578808581fee3 (diff)
downloadvdr-plugin-imonlcd-e35905da3b8f38ef246df5316f56ae623fd3f1db.tar.gz
vdr-plugin-imonlcd-e35905da3b8f38ef246df5316f56ae623fd3f1db.tar.bz2
Show next timer on exit (Feature #124)
Diffstat (limited to 'watch.c')
-rw-r--r--watch.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/watch.c b/watch.c
index 5d8a888..7441312 100644
--- a/watch.c
+++ b/watch.c
@@ -113,6 +113,46 @@ void ciMonWatch::close() {
usleep(500000);
Cancel();
}
+
+ switch(theSetup.m_nOnExit) {
+ case eOnExitMode_NEXTTIMER: {
+ isyslog("iMonLCD: closing, show next timer.");
+ cTimer* t = Timers.GetNextActiveTimer();
+ this->setLineLength(0,0,0,0);
+
+ this->clear();
+ if(t) {
+ struct tm l;
+ time_t tt = t->StartTime();
+ localtime_r(&tt, &l);
+ cString topic = cString::sprintf("%d. %02d:%02d %s", l.tm_mday, l.tm_hour, l.tm_min, t->File());
+ this->DrawText(0,0,topic);
+ this->icons(eIconALARM);
+ } else {
+ this->DrawText(0,0,tr("None active timer"));
+ this->icons(0);
+ }
+ this->flush();
+ break;
+ }
+ case eOnExitMode_SHOWMSG: {
+ isyslog("iMonLCD: closing, leaving \"last\" message.");
+ break;
+ }
+ case eOnExitMode_BLANKSCREEN: {
+ isyslog("iMonLCD: closing, turning backlight off.");
+ SendCmdShutdown();
+ break;
+ }
+ default:
+ case eOnExitMode_SHOWCLOCK: {
+ isyslog("iMonLCD: closing, showing clock.");
+ SendCmdClock();
+ break;
+ }
+ }
+
+
ciMonLCD::close();
}