diff options
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | ci.c | 16 | ||||
-rw-r--r-- | ci.h | 3 | ||||
-rw-r--r-- | menu.c | 15 |
4 files changed, 31 insertions, 7 deletions
@@ -45,7 +45,7 @@ Video Disk Recorder Revision History a prepended '@' character. - If an instant recording is currently active, the "Main" menu now contains an option to stop that recording. -- Timers are now only processed when the Menu is not active. So after editing +- Timers are now only processed when the menu is not active. So after editing a timer the effect will take place only after the menu has been closed. In order to avoid missing a timer event by inadvertently leaving the menu open, the menu will be closed automatically after about two minutes of @@ -3874,3 +3874,5 @@ Video Disk Recorder Revision History - The CAM menu now automatically updates itself in case of a progress display (as used, for instance, when updating the firmware via satellite). - Now skipping some funny characters sent by some CAMs at the beginning of strings. +- The CAM menu is now completely closed when pressing the Menu key while inside + a sub menu. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.c 1.30 2005/10/02 13:10:28 kls Exp $ + * $Id: ci.c 1.31 2005/10/02 13:20:41 kls Exp $ */ #include "ci.h" @@ -1032,6 +1032,7 @@ public: cCiEnquiry *Enquiry(bool Clear = false); bool SendMenuAnswer(uint8_t Selection); bool SendAnswer(const char *Text); + bool SendCloseMMI(void); }; cCiMMI::cCiMMI(int SessionId, cCiTransportConnection *Tc) @@ -1204,6 +1205,14 @@ bool cCiMMI::SendAnswer(const char *Text) return true; } +bool cCiMMI::SendCloseMMI(void) +{ + dbgprotocol("%d: ==> Close MMI\n", SessionId()); + SendData(AOT_CLOSE_MMI, 0); + //XXX return value of all SendData() calls??? + return true; +} + // --- cCiMenu --------------------------------------------------------------- cCiMenu::cCiMenu(cCiMMI *MMI, bool Selectable) @@ -1253,6 +1262,11 @@ bool cCiMenu::Cancel(void) return Select(-1); } +bool cCiMenu::Abort(void) +{ + return mmi->SendCloseMMI(); +} + // --- cCiEnquiry ------------------------------------------------------------ cCiEnquiry::cCiEnquiry(cCiMMI *MMI) @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.h 1.15 2005/10/02 12:51:22 kls Exp $ + * $Id: ci.h 1.16 2005/10/02 13:20:41 kls Exp $ */ #ifndef __CI_H @@ -40,6 +40,7 @@ public: bool Selectable(void) { return selectable; } bool Select(int Index); bool Cancel(void); + bool Abort(void); bool HasUpdate(void); }; @@ -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; |