mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Confirmation prompt in case of an upcoming timer event when pressing the 'Power' key
This commit is contained in:
parent
1b3d0f1d1b
commit
8c403e1b0d
@ -201,3 +201,7 @@ J
|
||||
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
|
||||
|
3
HISTORY
3
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.
|
||||
|
12
i18n.c
12
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
|
||||
|
11
vdr.c
11
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 : "";
|
||||
|
Loading…
Reference in New Issue
Block a user