diff options
author | anbr <vdr07@deltab.de> | 2009-05-30 15:20:13 +0200 |
---|---|---|
committer | anbr <vdr07@deltab.de> | 2009-05-30 15:20:13 +0200 |
commit | e35905da3b8f38ef246df5316f56ae623fd3f1db (patch) | |
tree | 654c1b787662e6a47607ea7b70133f43a6270ced /watch.c | |
parent | c1321723e80c9bf20e27be5e670578808581fee3 (diff) | |
download | vdr-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.c | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -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(); } |