summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-10-02 13:54:34 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-10-02 13:54:34 +0200
commit8365632b3f201f1b903dd88d80593435ba9545a1 (patch)
tree07705e4d45b3024171506840219a38679262c6b7 /menu.c
parent283a6f83f90a10175ffa6b5acbb895298223b48d (diff)
downloadvdr-8365632b3f201f1b903dd88d80593435ba9545a1.tar.gz
vdr-8365632b3f201f1b903dd88d80593435ba9545a1.tar.bz2
The CAM menu is now completely closed when pressing the Menu key while inside a sub menu
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/menu.c b/menu.c
index 8d8ecb96..7f32283c 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.367 2005/10/02 12:56:19 kls Exp $
+ * $Id: menu.c 1.368 2005/10/02 13:20:41 kls Exp $
*/
#include "menu.h"
@@ -1314,7 +1314,7 @@ cMenuCam::cMenuCam(cCiMenu *CiMenu)
cMenuCam::~cMenuCam()
{
if (!selected)
- ciMenu->Cancel();
+ ciMenu->Abort();
delete ciMenu;
}
@@ -1323,8 +1323,10 @@ eOSState cMenuCam::Select(void)
if (ciMenu->Selectable()) {
ciMenu->Select(Current() - offset);
dsyslog("CAM: select %d", Current() - offset);
- selected = true;
}
+ else
+ ciMenu->Cancel();
+ selected = true;
return osEnd;
}
@@ -1338,8 +1340,13 @@ eOSState cMenuCam::ProcessKey(eKeys Key)
default: break;
}
}
+ else if (state == osBack) {
+ ciMenu->Cancel();
+ selected = true;
+ return osEnd;
+ }
if (ciMenu->HasUpdate()) {
- selected = true; // just to not call ciMenu->Cancel()
+ selected = true;
return osEnd;
}
return state;