Fixed handling the "Power" key in case a recording is going on and no plugin is active

This commit is contained in:
Klaus Schmidinger 2006-04-29 09:24:07 +02:00
parent 70297ef174
commit 42ce340670
4 changed files with 34 additions and 21 deletions

View File

@ -1420,6 +1420,8 @@ Udo Richter <udo_richter@gmx.de>
for suggesting to add a warning about plugins that don't honor APIVERSION in their
Makefile
for providing a shorter version of the 'sed' expression for extracting APIVERSION
for fixing a bug in handling the "Power" key in case a recording is going on and
no plugin is active
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
@ -1886,3 +1888,7 @@ Markus Ehrnsperger <markus.ehrnsperger@googlemail.com>
Werner Färber <w.faerber@gmx.de>
for reporting a bug in handling the cPluginManager::Active() result when pressing
the "Power" key
Dominique Simon <d.simon@gmx.net>
for reporting a bug in handling the "Power" key in case a recording is going on and
no plugin is active

View File

@ -4677,3 +4677,8 @@ Video Disk Recorder Revision History
- Removed the obsolete "'1' for encrypted radio channels" part from the description
of the VPID in vdr.5 (reported by Alexander Hans).
- Fixed tuning to the channel of a VPS timer if the device is the actual device.
2006-04-29: Version 1.4.0
- Fixed handling the "Power" key in case a recording is going on and no plugin
is active (thanks to Udo Richter; bug reported by Dominique Simon).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.254 2006/04/28 12:33:13 kls Exp $
* $Id: config.h 1.255 2006/04/29 09:24:07 kls Exp $
*/
#ifndef __CONFIG_H
@ -21,13 +21,13 @@
// VDR's own version number:
#define VDRVERSION "1.3.49"
#define VDRVERSNUM 10349 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.4.0"
#define VDRVERSNUM 10400 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
#define APIVERSION "1.3.47"
#define APIVERSNUM 10347 // Version * 10000 + Major * 100 + Minor
#define APIVERSION "1.4.0"
#define APIVERSNUM 10400 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to

34
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
* $Id: vdr.c 1.266 2006/04/28 13:23:55 kls Exp $
* $Id: vdr.c 1.267 2006/04/29 09:14:06 kls Exp $
*/
#include <getopt.h>
@ -970,21 +970,23 @@ int main(int argc, char *argv[])
}
break;
// Power off:
case kPower: isyslog("Power button pressed");
DELETE_MENU;
if (!Shutdown) {
Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!"));
break;
}
if (cRecordControls::Active()) {
if (Interface->Confirm(tr("Recording - shut down anyway?")))
ForceShutdown = true;
}
if (!cPluginManager::Active(tr("shut down anyway?")))
ForceShutdown = true;
LastActivity = 1; // not 0, see below!
UserShutdown = true;
break;
case kPower:
isyslog("Power button pressed");
DELETE_MENU;
if (!Shutdown) {
Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!"));
break;
}
LastActivity = 1; // not 0, see below!
UserShutdown = true;
if (cRecordControls::Active()) {
if (!Interface->Confirm(tr("Recording - shut down anyway?")))
break;
}
if (cPluginManager::Active(tr("shut down anyway?")))
break;
ForceShutdown = true;
break;
default: break;
}
Interact = Menu ? Menu : cControl::Control(); // might have been closed in the mean time