summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/vdr.c b/vdr.c
index 670246a..9d5167b 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.94 2002/02/02 15:50:43 kls Exp $
+ * $Id: vdr.c 1.95 2002/02/10 15:12:43 kls Exp $
*/
#include <getopt.h>
@@ -494,13 +494,20 @@ int main(int argc, char *argv[])
else
LastActivity = 1;
}
+ bool UserShutdown = key == kPower;
+ if (UserShutdown && Next && Delta <= Setup.MinEventTimeout * 60 && !ForceShutdown) {
+ char *buf;
+ asprintf(&buf, tr("Recording in %d minutes, shut down anyway?"), Delta / 60);
+ if (Interface->Confirm(buf))
+ ForceShutdown = true;
+ delete buf;
+ }
if (!Next || Delta > Setup.MinEventTimeout * 60 || ForceShutdown) {
ForceShutdown = false;
if (timer)
dsyslog(LOG_INFO, "next timer event at %s", ctime(&Next));
if (WatchdogTimeout > 0)
signal(SIGALRM, SIG_IGN);
- bool UserShutdown = key == kPower;
if (Interface->Confirm(tr("Press any key to cancel shutdown"), UserShutdown ? 5 : SHUTDOWNWAIT, true)) {
int Channel = timer ? timer->channel : 0;
const char *File = timer ? timer->file : "";