The CAM enquiry menu now aborts if Menu is pressed

This commit is contained in:
Klaus Schmidinger 2005-10-03 12:58:22 +02:00
parent 876ad5d5f6
commit 5956f7eeec
3 changed files with 16 additions and 5 deletions

9
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "ci.h"
@ -1267,7 +1267,7 @@ bool cCiMenu::Cancel(void)
bool cCiMenu::Abort(void) bool cCiMenu::Abort(void)
{ {
return mmi->SendCloseMMI(); return mmi && mmi->SendCloseMMI();
} }
// --- cCiEnquiry ------------------------------------------------------------ // --- cCiEnquiry ------------------------------------------------------------
@ -1299,6 +1299,11 @@ bool cCiEnquiry::Cancel(void)
return Reply(NULL); return Reply(NULL);
} }
bool cCiEnquiry::Abort(void)
{
return mmi && mmi->SendCloseMMI();
}
// --- cCiCaPmt -------------------------------------------------------------- // --- cCiCaPmt --------------------------------------------------------------
// Ca Pmt List Management: // Ca Pmt List Management:

3
ci.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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 #ifndef __CI_H
@ -60,6 +60,7 @@ public:
int ExpectedLength(void) { return expectedLength; } int ExpectedLength(void) { return expectedLength; }
bool Reply(const char *s); bool Reply(const char *s);
bool Cancel(void); bool Cancel(void);
bool Abort(void);
}; };
class cCiCaPmt { class cCiCaPmt {

9
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "menu.h"
@ -1386,7 +1386,7 @@ cMenuCamEnquiry::cMenuCamEnquiry(cCiEnquiry *CiEnquiry)
cMenuCamEnquiry::~cMenuCamEnquiry() cMenuCamEnquiry::~cMenuCamEnquiry()
{ {
if (!replied) if (!replied)
ciEnquiry->Cancel(); ciEnquiry->Abort();
free(input); free(input);
delete ciEnquiry; delete ciEnquiry;
} }
@ -1414,6 +1414,11 @@ eOSState cMenuCamEnquiry::ProcessKey(eKeys Key)
default: break; default: break;
} }
} }
else if (state == osBack) {
ciEnquiry->Cancel();
replied = true;
return osEnd;
}
return state; return state;
} }