summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-17 12:04:35 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-17 12:04:35 +0100
commitb72b15cf8f373fd3e2df55b8ba6f0da4319c6a2f (patch)
tree141056443043e42e0957aaf8af77a7cc25528826 /menu.c
parentae3f18dd572dc0de2ec2077c644fdcf12fade034 (diff)
downloadvdr-b72b15cf8f373fd3e2df55b8ba6f0da4319c6a2f.tar.gz
vdr-b72b15cf8f373fd3e2df55b8ba6f0da4319c6a2f.tar.bz2
New Setup item 'Restart'
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 01ba8bb5..80d7c8e4 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.169 2002/03/16 16:44:15 kls Exp $
+ * $Id: menu.c 1.170 2002/03/17 12:01:08 kls Exp $
*/
#include "menu.h"
@@ -2142,6 +2142,7 @@ void cMenuSetupMisc::Set(void)
class cMenuSetup : public cOsdMenu {
private:
virtual void Set(void);
+ eOSState Restart(void);
public:
cMenuSetup(void);
virtual eOSState ProcessKey(eKeys Key);
@@ -2166,6 +2167,16 @@ void cMenuSetup::Set(void)
Add(new cOsdItem(hk(tr("Recording")), osUser6));
Add(new cOsdItem(hk(tr("Replay")), osUser7));
Add(new cOsdItem(hk(tr("Miscellaneous")), osUser8));
+ Add(new cOsdItem(hk(tr("Restart")), osUser9));
+}
+
+eOSState cMenuSetup::Restart(void)
+{
+ if (Interface->Confirm(cRecordControls::Active() ? tr("Recording - restart anyway?") : tr("Really restart?"))) {
+ cThread::EmergencyExit(true);
+ return osEnd;
+ }
+ return osContinue;
}
eOSState cMenuSetup::ProcessKey(eKeys Key)
@@ -2182,6 +2193,7 @@ eOSState cMenuSetup::ProcessKey(eKeys Key)
case osUser6: return AddSubMenu(new cMenuSetupRecord);
case osUser7: return AddSubMenu(new cMenuSetupReplay);
case osUser8: return AddSubMenu(new cMenuSetupMisc);
+ case osUser9: return Restart();
default: ;
}
if (Setup.OSDLanguage != osdLanguage) {