summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-11-14 16:27:27 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-11-14 16:27:27 +0100
commitac8e03a89cb86e2f68924533d53a3c93f7c972c9 (patch)
treed0a5ef85f87cae71c85c0512668db07c5395e7f9
parent1ed36b04bc06f73abea7b774ae9990d4e4ec671c (diff)
downloadvdr-1.3.16.tar.gz
vdr-1.3.16.tar.bz2
Implemented handling of number keys in the 'Timers' menu for toggling days1.3.16
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY4
-rw-r--r--MANUAL8
-rw-r--r--menuitems.c32
-rw-r--r--timers.c6
-rw-r--r--timers.h6
6 files changed, 49 insertions, 10 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 5e401ebb..000ed460 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1146,3 +1146,6 @@ Mogens Elneff <mogens@elneff.dk>
Joachim Wilke <vdr@joachim-wilke.de>
for reporting missing calls to cStatus::MsgOsdClear() in cSkins::Message()
+
+Sascha Klek <sklek@gmx.de>
+ for reporting a problem with the '0' key in the "Day" item of the "Timers" menu
diff --git a/HISTORY b/HISTORY
index 4190166b..019861a7 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3134,3 +3134,7 @@ Video Disk Recorder Revision History
- Added missing initialization of cEvent::seen.
- Checking PID language codes for ISO 639 compliance to avoid problems with
funny characters. Invalid language codes will be stored as "???".
+- The '0' key now toggles the "Day" item in the "Timers" menu between "single
+ shot" and "repeating". The keys '1'...'7' can be used to toggle the individual
+ days ('1' is monday). Thanks to Sascha Klek for reporting a problem with the
+ '0' key in the "Day" item of the "Timers" menu.
diff --git a/MANUAL b/MANUAL
index cc89252f..f5a1814c 100644
--- a/MANUAL
+++ b/MANUAL
@@ -24,7 +24,7 @@ Version 1.2
Green - Language New New Ins/Ovr Rewind Skip -60s
Yellow - Pause live Delete Delete Delete Delete Skip +60s
Blue - Stop/Resume Mark On/Off(1) - Summary Stop
- 0..9 Ch select - Sort(3) - Numeric inp. Exec cmd(2) Editing
+ 0..9 Ch select - Sort(3) Day(4) Numeric inp. Exec cmd(2) Editing
In a numerical input field (like the response to a CAM enquiry) the keys 0..9
are used to enter the data, and the Left key can be used to delete the last
@@ -73,6 +73,9 @@ Version 1.2
(2) See "Processing Recordings" below.
(3) In the "Channels" menu the '0' key switches the sort mode through "by number",
"by name" and "by provider".
+ (4) In the "Timers" menu, when on the "Day" item, the '0' key toggles between
+ a single shot and a repeating timer. If "Day" indicates a repeating timer,
+ the keys '1'...'7' can be used to toggle the individual days ('1' is monday).
* Navigating through the On Screen Menus
@@ -369,6 +372,9 @@ Version 1.2
by listing the days of the week on which they shall record.
For example, a timer that shall record every monday and wednesday
would have a Day setting of "M-W----".
+ The '0' key toggles between a single shot and a repeating timer.
+ If "Day" indicates a repeating timer, the keys '1'...'7' can be
+ used to toggle the individual days ('1' is monday).
Start: The start time of the timer in hh:mm as 24 hour ("military") time.
Stop: The stop time of the timer.
VPS: Defines whether the timer shall use VPS (if available). If this
diff --git a/menuitems.c b/menuitems.c
index ee92dc9f..dea20295 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.19 2004/06/19 09:45:45 kls Exp $
+ * $Id: menuitems.c 1.20 2004/11/14 16:16:21 kls Exp $
*/
#include "menuitems.h"
@@ -495,7 +495,7 @@ eOSState cMenuEditChanItem::ProcessKey(eKeys Key)
}
}
break;
- default : return cMenuEditIntItem::ProcessKey(Key);
+ default: return cMenuEditIntItem::ProcessKey(Key);
}
return osContinue;
}
@@ -606,7 +606,33 @@ eOSState cMenuEditDayItem::ProcessKey(eKeys Key)
return cMenuEditIntItem::ProcessKey(Key);
Set();
break;
- default : return cMenuEditIntItem::ProcessKey(Key);
+ default: {
+ if (d >= 0) {
+ if (k1 <= Key && Key <= k7) {
+ int v = *value ^ (1 << (Key - k1));
+ if ((v & 0xFF) != 0) {
+ *value = v; // can't let this become all 0
+ Set();
+ }
+ break;
+ }
+ }
+ int v = *value;
+ eOSState result = cMenuEditIntItem::ProcessKey(Key);
+ if (result == osContinue && Key == k0) {
+ if (d >= 0) {
+ *value = cTimer::GetMDay(time(NULL));
+ d = -1;
+ Set();
+ }
+ else if (*value == 0 || *value == v) {
+ d = cTimer::GetWDay(time(NULL));
+ *value = days[d];
+ Set();
+ }
+ }
+ return result;
+ }
}
return osContinue;
}
diff --git a/timers.c b/timers.c
index 38fbf394..501396ee 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.16 2004/10/31 16:41:30 kls Exp $
+ * $Id: timers.c 1.17 2004/11/14 16:02:42 kls Exp $
*/
#include "timers.h"
@@ -256,13 +256,13 @@ bool cTimer::IsSingleEvent(void) const
return (day & 0x80000000) == 0;
}
-int cTimer::GetMDay(time_t t) const
+int cTimer::GetMDay(time_t t)
{
struct tm tm_r;
return localtime_r(&t, &tm_r)->tm_mday;
}
-int cTimer::GetWDay(time_t t) const
+int cTimer::GetWDay(time_t t)
{
struct tm tm_r;
int weekday = localtime_r(&t, &tm_r)->tm_wday;
diff --git a/timers.h b/timers.h
index 24f54adf..bdf1b0d9 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.10 2004/10/31 16:41:17 kls Exp $
+ * $Id: timers.h 1.11 2004/11/14 16:02:28 kls Exp $
*/
#ifndef __TIMERS_H
@@ -64,8 +64,8 @@ public:
bool Parse(const char *s);
bool Save(FILE *f);
bool IsSingleEvent(void) const;
- int GetMDay(time_t t) const;
- int GetWDay(time_t t) const;
+ static int GetMDay(time_t t);
+ static int GetWDay(time_t t);
bool DayMatches(time_t t) const;
static time_t IncDay(time_t t, int Days);
static time_t SetTime(time_t t, int SecondsFromMidnight);