summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-02-09 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-02-09 18:00:00 +0100
commitb09aaa00a58ec72d0331a01f31b3df16d43ce90b (patch)
tree92e95c191cf4d07eccc3226c100daac7eaa57af3 /menu.c
parent8c5d735d3279230f6471e474a946a5733054df43 (diff)
downloadvdr-patch-lnbsharing-b09aaa00a58ec72d0331a01f31b3df16d43ce90b.tar.gz
vdr-patch-lnbsharing-b09aaa00a58ec72d0331a01f31b3df16d43ce90b.tar.bz2
Version 1.1.24vdr-1.1.24
- Improved CAM handling (thanks to Reinhard Walter Buchner for a great deal of help in debugging this). It is now possible to insert the CAM in any of the two slots, to insert and remove it while VDR is running and even to have two CAMs inserted. - Turning SI filtering off and on when switching channels. - Timers are now processed even if an OSD menu is open (except for menus that explicitly handle timers).
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c36
1 files changed, 28 insertions, 8 deletions
diff --git a/menu.c b/menu.c
index 081a4ba..1a34e42 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.232 2003/01/19 14:59:46 kls Exp $
+ * $Id: menu.c 1.234 2003/02/09 12:55:38 kls Exp $
*/
#include "menu.h"
@@ -837,6 +837,7 @@ private:
void SetFirstDayItem(void);
public:
cMenuEditTimer(int Index, bool New = false);
+ virtual ~cMenuEditTimer();
virtual eOSState ProcessKey(eKeys Key);
};
@@ -860,6 +861,12 @@ cMenuEditTimer::cMenuEditTimer(int Index, bool New)
Add(new cMenuEditStrItem( tr("File"), data.file, sizeof(data.file), tr(FileNameChars)));
SetFirstDayItem();
}
+ Timers.IncBeingEdited();
+}
+
+cMenuEditTimer::~cMenuEditTimer()
+{
+ Timers.DecBeingEdited();
}
void cMenuEditTimer::SetFirstDayItem(void)
@@ -964,6 +971,7 @@ private:
cTimer *CurrentTimer(void);
public:
cMenuTimers(void);
+ virtual ~cMenuTimers();
virtual eOSState ProcessKey(eKeys Key);
};
@@ -980,6 +988,12 @@ cMenuTimers::cMenuTimers(void)
if (Setup.SortTimers)
Sort();
SetHelp(tr("Edit"), tr("New"), tr("Delete"), Setup.SortTimers ? tr("On/Off") : tr("Mark"));
+ Timers.IncBeingEdited();
+}
+
+cMenuTimers::~cMenuTimers()
+{
+ Timers.DecBeingEdited();
}
cTimer *cMenuTimers::CurrentTimer(void)
@@ -1537,6 +1551,7 @@ cMenuCam::cMenuCam(cCiMenu *CiMenu)
Add(new cOsdItem(ciMenu->SubTitleText()));
Add(new cOsdItem(ciMenu->BottomText()));
Display();
+ dsyslog("CAM: Menu - %s", ciMenu->TitleText());
}
cMenuCam::~cMenuCam()
@@ -1622,7 +1637,6 @@ cOsdObject *CamControl(void)
if (Device) {
cCiHandler *CiHandler = Device->CiHandler();
if (CiHandler) {
- CiHandler->Process();
cCiMenu *CiMenu = CiHandler->GetMenu();
if (CiMenu)
return new cMenuCam(CiMenu);
@@ -2069,7 +2083,7 @@ class cMenuSetupCICAM : public cMenuSetupBase {
private:
int helpKeys;
void SetHelpKeys(void);
- cCiHandler *GetCurrentCiHandler(void);
+ cCiHandler *GetCurrentCiHandler(int *Slot = NULL);
eOSState Menu(void);
eOSState Reset(void);
public:
@@ -2091,9 +2105,11 @@ cMenuSetupCICAM::cMenuSetupCICAM(void)
SetHelpKeys();
}
-cCiHandler *cMenuSetupCICAM::GetCurrentCiHandler(void)
+cCiHandler *cMenuSetupCICAM::GetCurrentCiHandler(int *Slot)
{
cDevice *Device = cDevice::GetDevice(Current() / 2);
+ if (Slot)
+ *Slot = Current() % 2;
return Device ? Device->CiHandler() : NULL;
}
@@ -2112,8 +2128,9 @@ void cMenuSetupCICAM::SetHelpKeys(void)
eOSState cMenuSetupCICAM::Menu(void)
{
- cCiHandler *CiHandler = GetCurrentCiHandler();
- if (CiHandler && CiHandler->EnterMenu())
+ int Slot = 0;
+ cCiHandler *CiHandler = GetCurrentCiHandler(&Slot);
+ if (CiHandler && CiHandler->EnterMenu(Slot))
return osEnd; // the CAM menu will be executed explicitly from the main loop
else
Interface->Error(tr("Can't open CAM menu!"));
@@ -2122,9 +2139,12 @@ eOSState cMenuSetupCICAM::Menu(void)
eOSState cMenuSetupCICAM::Reset(void)
{
- cCiHandler *CiHandler = GetCurrentCiHandler();
- if (CiHandler && CiHandler->Reset())
+ int Slot = 0;
+ cCiHandler *CiHandler = GetCurrentCiHandler(&Slot);
+ if (CiHandler && CiHandler->Reset(Slot)) {
Interface->Info(tr("CAM has been reset"));
+ return osEnd;
+ }
else
Interface->Error(tr("Can't reset CAM!"));
return osContinue;