summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-13 09:03:53 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-13 09:03:53 +0200
commite58fa67e6c53dc8ad061a2941b9984a0c1185a8f (patch)
tree1b0e139b036885c17195a78869d5ff6ccef80dfb /menu.c
parentfadc2565d468afca10448600033b73af1ef74978 (diff)
downloadvdr-e58fa67e6c53dc8ad061a2941b9984a0c1185a8f.tar.gz
vdr-e58fa67e6c53dc8ad061a2941b9984a0c1185a8f.tar.bz2
Implemented '?' handling for commands.conf
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/menu.c b/menu.c
index 5ea8663b..786e1398 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.214 2002/10/12 13:34:56 kls Exp $
+ * $Id: menu.c 1.215 2002/10/13 08:44:33 kls Exp $
*/
#include "menu.h"
@@ -2079,13 +2079,21 @@ eOSState cMenuCommands::Execute(void)
cCommand *command = Commands.Get(Current());
if (command) {
char *buffer = NULL;
- asprintf(&buffer, "%s...", command->Title());
- Interface->Status(buffer);
- Interface->Flush();
- free(buffer);
- const char *Result = command->Execute();
- if (Result)
- return AddSubMenu(new cMenuText(command->Title(), Result, fontFix));
+ bool confirmed = true;
+ if (command->Confirm()) {
+ asprintf(&buffer, "%s?", command->Title());
+ confirmed = Interface->Confirm(buffer);
+ free(buffer);
+ }
+ if (confirmed) {
+ asprintf(&buffer, "%s...", command->Title());
+ Interface->Status(buffer);
+ Interface->Flush();
+ free(buffer);
+ const char *Result = command->Execute();
+ if (Result)
+ return AddSubMenu(new cMenuText(command->Title(), Result, fontFix));
+ }
}
return osContinue;
}