diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-11-21 13:28:05 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-11-21 13:28:05 +0100 |
commit | c2daf37ed136f85dd94cfd6cfa670aba9d93193c (patch) | |
tree | c4ff721ed234d1f90900c60078458ec0faeb9ec0 /menuitems.c | |
parent | 969864aacbe593fb237aa173f68eb61f859e8e66 (diff) | |
download | vdr-c2daf37ed136f85dd94cfd6cfa670aba9d93193c.tar.gz vdr-c2daf37ed136f85dd94cfd6cfa670aba9d93193c.tar.bz2 |
Fixed toggling the 'Day' item in the 'Timers' menu, so that it selects the right day of week for timers in the future
Diffstat (limited to 'menuitems.c')
-rw-r--r-- | menuitems.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/menuitems.c b/menuitems.c index dea20295..9b86db4b 100644 --- a/menuitems.c +++ b/menuitems.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.c 1.20 2004/11/14 16:16:21 kls Exp $ + * $Id: menuitems.c 1.21 2004/11/21 13:24:10 kls Exp $ */ #include "menuitems.h" @@ -554,6 +554,7 @@ cMenuEditDayItem::cMenuEditDayItem(const char *Name, int *Value) :cMenuEditIntItem(Name, Value, -INT_MAX, 31) { d = -1; + md = 0; if (*value < 0) { int n = 0; while (days[n]) { @@ -621,12 +622,14 @@ eOSState cMenuEditDayItem::ProcessKey(eKeys Key) eOSState result = cMenuEditIntItem::ProcessKey(Key); if (result == osContinue && Key == k0) { if (d >= 0) { - *value = cTimer::GetMDay(time(NULL)); + *value = md ? md : cTimer::GetMDay(time(NULL)); + md = 0; d = -1; Set(); } else if (*value == 0 || *value == v) { - d = cTimer::GetWDay(time(NULL)); + md = v; + d = cTimer::GetWDayFromMDay(v); *value = days[d]; Set(); } |