summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-15 13:44:55 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-15 13:44:55 +0100
commitcad1a88a7b5826ce2a03f4853a5c204c066a8ec4 (patch)
tree83ae8c952af7783b8189bfe2d01395b5ccdc8f33 /menu.c
parent197b8c27fa486577ea35e9e89d09abd877fd5c70 (diff)
downloadvdr-cad1a88a7b5826ce2a03f4853a5c204c066a8ec4.tar.gz
vdr-cad1a88a7b5826ce2a03f4853a5c204c066a8ec4.tar.bz2
The status markers in the "Schedule" menu are now only updated if a submenu is closed in which a timer has been modified
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/menu.c b/menu.c
index af9cebf8..ba0a7a03 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.394 2006/01/15 12:46:07 kls Exp $
+ * $Id: menu.c 1.395 2006/01/15 13:35:05 kls Exp $
*/
#include "menu.h"
@@ -1030,6 +1030,7 @@ class cMenuWhatsOn : public cOsdMenu {
private:
bool now;
int helpKeys;
+ int timerState;
eOSState Record(void);
eOSState Switch(void);
static int currentChannel;
@@ -1052,6 +1053,8 @@ cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentCha
{
now = Now;
helpKeys = -1;
+ timerState = 0;
+ Timers.Modified(timerState);
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep()) {
const cSchedule *Schedule = Schedules->GetSchedule(Channel);
@@ -1069,10 +1072,12 @@ cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentCha
bool cMenuWhatsOn::Update(void)
{
bool result = false;
- for (cOsdItem *item = First(); item; item = Next(item)) {
- if (((cMenuScheduleItem *)item)->Update())
- result = true;
- }
+ if (Timers.Modified(timerState)) {
+ for (cOsdItem *item = First(); item; item = Next(item)) {
+ if (((cMenuScheduleItem *)item)->Update())
+ result = true;
+ }
+ }
return result;
}
@@ -1188,6 +1193,7 @@ private:
bool now, next;
int otherChannel;
int helpKeys;
+ int timerState;
eOSState Number(void);
eOSState Record(void);
eOSState Switch(void);
@@ -1209,6 +1215,8 @@ cMenuSchedule::cMenuSchedule(void)
now = next = false;
otherChannel = 0;
helpKeys = -1;
+ timerState = 0;
+ Timers.Modified(timerState);
cMenuScheduleItem::SetSortMode(cMenuScheduleItem::ssmAllThis);
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (channel) {
@@ -1306,10 +1314,12 @@ void cMenuSchedule::PrepareScheduleAllAll(const cEvent *Event, const cChannel *C
bool cMenuSchedule::Update(void)
{
bool result = false;
- for (cOsdItem *item = First(); item; item = Next(item)) {
- if (((cMenuScheduleItem *)item)->Update())
- result = true;
- }
+ if (Timers.Modified(timerState)) {
+ for (cOsdItem *item = First(); item; item = Next(item)) {
+ if (((cMenuScheduleItem *)item)->Update())
+ result = true;
+ }
+ }
return result;
}