summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--menu.c16
-rw-r--r--timers.h7
-rw-r--r--vdr.c4
4 files changed, 25 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index a508943e..93693668 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1954,3 +1954,5 @@ Video Disk Recorder Revision History
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).
diff --git a/menu.c b/menu.c
index 495cb6a3..1a34e42c 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.233 2003/02/09 10:46:25 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)
diff --git a/timers.h b/timers.h
index 3d308888..a179e52c 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.3 2002/11/24 11:50:56 kls Exp $
+ * $Id: timers.h 1.4 2003/02/09 12:49:45 kls Exp $
*/
#ifndef __TIMERS_H
@@ -80,10 +80,15 @@ public:
};
class cTimers : public cConfig<cTimer> {
+private:
+ int beingEdited;
public:
cTimer *GetTimer(cTimer *Timer);
cTimer *GetMatch(time_t t);
cTimer *GetNextActiveTimer(void);
+ int BeingEdited(void) { return beingEdited; }
+ void IncBeingEdited(void) { beingEdited++; }
+ void DecBeingEdited(void) { beingEdited--; }
};
extern cTimers Timers;
diff --git a/vdr.c b/vdr.c
index 166afb04..dfaf5dcb 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.142 2003/02/09 11:25:38 kls Exp $
+ * $Id: vdr.c 1.143 2003/02/09 13:13:42 kls Exp $
*/
#include <getopt.h>
@@ -459,7 +459,7 @@ int main(int argc, char *argv[])
LastChannel = cDevice::CurrentChannel();
}
// Timers and Recordings:
- if (!Menu) {
+ if (!Timers.BeingEdited()) {
time_t Now = time(NULL); // must do both following calls with the exact same time!
cRecordControls::Process(Now);
cTimer *Timer = Timers.GetMatch(Now);