summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-02-10 15:18:45 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-02-10 15:18:45 +0100
commit8c403e1b0df6c961662c8733c27faa54bace065b (patch)
tree2eb57f7dc5045d50f27bd6fe95d222160ac46416
parent1b3d0f1d1bc019fa4b1790596c4dcc3215ef6ce7 (diff)
downloadvdr-8c403e1b0df6c961662c8733c27faa54bace065b.tar.gz
vdr-8c403e1b0df6c961662c8733c27faa54bace065b.tar.bz2
Confirmation prompt in case of an upcoming timer event when pressing the 'Power' key
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY3
-rw-r--r--i18n.c12
-rw-r--r--vdr.c11
4 files changed, 27 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 07925b51..9ccf53db 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -201,3 +201,7 @@ Jürgen Schmidt <ju@ct.heise.de>
Uwe Freese <mail@uwe-freese.de>
for suggesting to automatically close an empty recordings page after deleting
an entry
+
+Rainer Zocholl <Usenet-372114@zocki.toppoint.de>
+ for suggesting a confirmation prompt when the user presses the "Power" button
+ and there is an upcoming timer event
diff --git a/HISTORY b/HISTORY
index cd889c18..26a3acbd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -991,3 +991,6 @@ Video Disk Recorder Revision History
longer shown (thanks to Andy Grobb).
- If compiled with VFAT=1, characters that can't be handled by a VFAT system are
now encoded to '#XX'.
+- When the user presses the "Power" button and there is a timer about to start
+ recording within Setup.MinEventTimeout minutes, there is now a confirmation
+ prompt telling the user that there is an upcoming timer event.
diff --git a/i18n.c b/i18n.c
index 3a16f81e..f2c414f0 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.52 2002/02/09 17:20:19 kls Exp $
+ * $Id: i18n.c 1.53 2002/02/10 15:07:46 kls Exp $
*
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
@@ -452,6 +452,16 @@ const tPhrase Phrases[] = {
"", // TODO
"Nauhoitus kesken - lopetetaanko se?",
},
+ { "Recording in %d minutes, shut down anyway?",
+ "Aufnahme in %d Minuten - trotzdem ausschalten?",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ },
{ "Press any key to cancel shutdown",
"Taste drücken um Shutdown abzubrechen",
"", // TODO
diff --git a/vdr.c b/vdr.c
index 72f04f8f..9d5167b4 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:59:18 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 : "";