mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented handling of number keys in the 'Timers' menu for toggling days
This commit is contained in:
parent
1ed36b04bc
commit
ac8e03a89c
@ -1146,3 +1146,6 @@ Mogens Elneff <mogens@elneff.dk>
|
|||||||
|
|
||||||
Joachim Wilke <vdr@joachim-wilke.de>
|
Joachim Wilke <vdr@joachim-wilke.de>
|
||||||
for reporting missing calls to cStatus::MsgOsdClear() in cSkins::Message()
|
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
|
||||||
|
4
HISTORY
4
HISTORY
@ -3134,3 +3134,7 @@ Video Disk Recorder Revision History
|
|||||||
- Added missing initialization of cEvent::seen.
|
- Added missing initialization of cEvent::seen.
|
||||||
- Checking PID language codes for ISO 639 compliance to avoid problems with
|
- Checking PID language codes for ISO 639 compliance to avoid problems with
|
||||||
funny characters. Invalid language codes will be stored as "???".
|
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.
|
||||||
|
8
MANUAL
8
MANUAL
@ -24,7 +24,7 @@ Version 1.2
|
|||||||
Green - Language New New Ins/Ovr Rewind Skip -60s
|
Green - Language New New Ins/Ovr Rewind Skip -60s
|
||||||
Yellow - Pause live Delete Delete Delete Delete Skip +60s
|
Yellow - Pause live Delete Delete Delete Delete Skip +60s
|
||||||
Blue - Stop/Resume Mark On/Off(1) - Summary Stop
|
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
|
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
|
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.
|
(2) See "Processing Recordings" below.
|
||||||
(3) In the "Channels" menu the '0' key switches the sort mode through "by number",
|
(3) In the "Channels" menu the '0' key switches the sort mode through "by number",
|
||||||
"by name" and "by provider".
|
"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
|
* 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.
|
by listing the days of the week on which they shall record.
|
||||||
For example, a timer that shall record every monday and wednesday
|
For example, a timer that shall record every monday and wednesday
|
||||||
would have a Day setting of "M-W----".
|
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.
|
Start: The start time of the timer in hh:mm as 24 hour ("military") time.
|
||||||
Stop: The stop time of the timer.
|
Stop: The stop time of the timer.
|
||||||
VPS: Defines whether the timer shall use VPS (if available). If this
|
VPS: Defines whether the timer shall use VPS (if available). If this
|
||||||
|
32
menuitems.c
32
menuitems.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "menuitems.h"
|
||||||
@ -495,7 +495,7 @@ eOSState cMenuEditChanItem::ProcessKey(eKeys Key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default : return cMenuEditIntItem::ProcessKey(Key);
|
default: return cMenuEditIntItem::ProcessKey(Key);
|
||||||
}
|
}
|
||||||
return osContinue;
|
return osContinue;
|
||||||
}
|
}
|
||||||
@ -606,7 +606,33 @@ eOSState cMenuEditDayItem::ProcessKey(eKeys Key)
|
|||||||
return cMenuEditIntItem::ProcessKey(Key);
|
return cMenuEditIntItem::ProcessKey(Key);
|
||||||
Set();
|
Set();
|
||||||
break;
|
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;
|
return osContinue;
|
||||||
}
|
}
|
||||||
|
6
timers.c
6
timers.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "timers.h"
|
||||||
@ -256,13 +256,13 @@ bool cTimer::IsSingleEvent(void) const
|
|||||||
return (day & 0x80000000) == 0;
|
return (day & 0x80000000) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cTimer::GetMDay(time_t t) const
|
int cTimer::GetMDay(time_t t)
|
||||||
{
|
{
|
||||||
struct tm tm_r;
|
struct tm tm_r;
|
||||||
return localtime_r(&t, &tm_r)->tm_mday;
|
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;
|
struct tm tm_r;
|
||||||
int weekday = localtime_r(&t, &tm_r)->tm_wday;
|
int weekday = localtime_r(&t, &tm_r)->tm_wday;
|
||||||
|
6
timers.h
6
timers.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __TIMERS_H
|
||||||
@ -64,8 +64,8 @@ public:
|
|||||||
bool Parse(const char *s);
|
bool Parse(const char *s);
|
||||||
bool Save(FILE *f);
|
bool Save(FILE *f);
|
||||||
bool IsSingleEvent(void) const;
|
bool IsSingleEvent(void) const;
|
||||||
int GetMDay(time_t t) const;
|
static int GetMDay(time_t t);
|
||||||
int GetWDay(time_t t) const;
|
static int GetWDay(time_t t);
|
||||||
bool DayMatches(time_t t) const;
|
bool DayMatches(time_t t) const;
|
||||||
static time_t IncDay(time_t t, int Days);
|
static time_t IncDay(time_t t, int Days);
|
||||||
static time_t SetTime(time_t t, int SecondsFromMidnight);
|
static time_t SetTime(time_t t, int SecondsFromMidnight);
|
||||||
|
Loading…
Reference in New Issue
Block a user