From 5956f7eeec27d86cb56642f51c423f4198a6ca43 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 3 Oct 2005 12:58:22 +0200 Subject: [PATCH] The CAM enquiry menu now aborts if Menu is pressed --- ci.c | 9 +++++++-- ci.h | 3 ++- menu.c | 9 +++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ci.c b/ci.c index d4e30b43..9e86c613 100644 --- a/ci.c +++ b/ci.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.c 1.35 2005/10/03 12:48:13 kls Exp $ + * $Id: ci.c 1.36 2005/10/03 12:58:22 kls Exp $ */ #include "ci.h" @@ -1267,7 +1267,7 @@ bool cCiMenu::Cancel(void) bool cCiMenu::Abort(void) { - return mmi->SendCloseMMI(); + return mmi && mmi->SendCloseMMI(); } // --- cCiEnquiry ------------------------------------------------------------ @@ -1299,6 +1299,11 @@ bool cCiEnquiry::Cancel(void) return Reply(NULL); } +bool cCiEnquiry::Abort(void) +{ + return mmi && mmi->SendCloseMMI(); +} + // --- cCiCaPmt -------------------------------------------------------------- // Ca Pmt List Management: diff --git a/ci.h b/ci.h index 34b422fa..6c35e6f0 100644 --- a/ci.h +++ b/ci.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.h 1.16 2005/10/02 13:20:41 kls Exp $ + * $Id: ci.h 1.17 2005/10/03 12:49:52 kls Exp $ */ #ifndef __CI_H @@ -60,6 +60,7 @@ public: int ExpectedLength(void) { return expectedLength; } bool Reply(const char *s); bool Cancel(void); + bool Abort(void); }; class cCiCaPmt { diff --git a/menu.c b/menu.c index 53251f25..19079bec 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.373 2005/10/03 12:24:34 kls Exp $ + * $Id: menu.c 1.374 2005/10/03 12:53:51 kls Exp $ */ #include "menu.h" @@ -1386,7 +1386,7 @@ cMenuCamEnquiry::cMenuCamEnquiry(cCiEnquiry *CiEnquiry) cMenuCamEnquiry::~cMenuCamEnquiry() { if (!replied) - ciEnquiry->Cancel(); + ciEnquiry->Abort(); free(input); delete ciEnquiry; } @@ -1414,6 +1414,11 @@ eOSState cMenuCamEnquiry::ProcessKey(eKeys Key) default: break; } } + else if (state == osBack) { + ciEnquiry->Cancel(); + replied = true; + return osEnd; + } return state; }