mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Timers are now processed even if a menu is open
This commit is contained in:
parent
7db4f96252
commit
8ddaaf9849
2
HISTORY
2
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).
|
||||
|
16
menu.c
16
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)
|
||||
|
7
timers.h
7
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;
|
||||
|
4
vdr.c
4
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);
|
||||
|
Loading…
Reference in New Issue
Block a user