diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2007-02-25 10:56:29 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2007-02-25 10:56:29 +0100 |
commit | ddb7f335674d668af3dd06bd61a0853b3af60df0 (patch) | |
tree | 5d52ba7939f6aa0b18cc01f546ce5c82ae8d3b80 /menu.c | |
parent | 50b14be807e1d3002246f359de83a8a18a0e6008 (diff) | |
download | vdr-ddb7f335674d668af3dd06bd61a0853b3af60df0.tar.gz vdr-ddb7f335674d668af3dd06bd61a0853b3af60df0.tar.bz2 |
Rewrite of shutdown handling; implemented cPlugin::WakeupTime(); SIGHUP forces reload; cThread::EmergencyExit() replaced by ShutdownHandler.RequestEmergencyExit()
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.447 2007/01/07 14:19:48 kls Exp $ + * $Id: menu.c 1.448 2007/02/25 09:51:53 kls Exp $ */ #include "menu.h" @@ -22,6 +22,7 @@ #include "plugin.h" #include "recording.h" #include "remote.h" +#include "shutdown.h" #include "sources.h" #include "status.h" #include "themes.h" @@ -2770,10 +2771,8 @@ void cMenuSetup::Set(void) eOSState cMenuSetup::Restart(void) { - if (Interface->Confirm(tr("Really restart?")) - && (!cRecordControls::Active() || Interface->Confirm(tr("Recording - restart anyway?"))) - && !cPluginManager::Active(tr("restart anyway?"))) { - cThread::EmergencyExit(true); + if (Interface->Confirm(tr("Really restart?")) && ShutdownHandler.ConfirmRestart(true)) { + ShutdownHandler.Exit(1); return osEnd; } return osContinue; @@ -3699,7 +3698,7 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause) if (device) { dsyslog("switching device %d to channel %d", device->DeviceNumber() + 1, channel->Number()); if (!device->SwitchChannel(channel, false)) { - cThread::EmergencyExit(true); + ShutdownHandler.RequestEmergencyExit(); return false; } if (!Timer || Timer->Matches()) { |