mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
When toggling a timer between "Single" and "Repeating", the previous setting is now retained in case the user toggles back to the original value
This commit is contained in:
parent
4dcbf19ea2
commit
845d6f36c1
2
HISTORY
2
HISTORY
@ -7035,3 +7035,5 @@ Video Disk Recorder Revision History
|
|||||||
- Improved fast forwarding to the end of a timeshift recording.
|
- Improved fast forwarding to the end of a timeshift recording.
|
||||||
- The new function cDevice::DeviceName() returns a string identifying the name of
|
- The new function cDevice::DeviceName() returns a string identifying the name of
|
||||||
the given device.
|
the given device.
|
||||||
|
- When toggling a timer between "Single" and "Repeating", the previous setting is now
|
||||||
|
retained in case the user toggles back to the original value.
|
||||||
|
@ -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 2.12 2012/03/08 13:22:22 kls Exp $
|
* $Id: menuitems.c 2.13 2012/03/13 11:21:57 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menuitems.h"
|
#include "menuitems.h"
|
||||||
@ -855,6 +855,7 @@ cMenuEditDateItem::cMenuEditDateItem(const char *Name, time_t *Value, int *WeekD
|
|||||||
value = Value;
|
value = Value;
|
||||||
weekdays = WeekDays;
|
weekdays = WeekDays;
|
||||||
oldvalue = 0;
|
oldvalue = 0;
|
||||||
|
oldweekdays = 0;
|
||||||
dayindex = weekdays ? FindDayIndex(*weekdays) : 0;
|
dayindex = weekdays ? FindDayIndex(*weekdays) : 0;
|
||||||
Set();
|
Set();
|
||||||
}
|
}
|
||||||
@ -892,10 +893,12 @@ void cMenuEditDateItem::ToggleRepeating(void)
|
|||||||
if (*weekdays) {
|
if (*weekdays) {
|
||||||
*value = cTimer::SetTime(oldvalue ? oldvalue : time(NULL), 0);
|
*value = cTimer::SetTime(oldvalue ? oldvalue : time(NULL), 0);
|
||||||
oldvalue = 0;
|
oldvalue = 0;
|
||||||
|
oldweekdays = *weekdays;
|
||||||
*weekdays = 0;
|
*weekdays = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*weekdays = days[cTimer::GetWDay(*value)];
|
*weekdays = oldweekdays ? oldweekdays : days[cTimer::GetWDay(*value)];
|
||||||
|
oldweekdays = 0;
|
||||||
dayindex = FindDayIndex(*weekdays);
|
dayindex = FindDayIndex(*weekdays);
|
||||||
oldvalue = *value;
|
oldvalue = *value;
|
||||||
*value = 0;
|
*value = 0;
|
||||||
|
@ -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.h 2.7 2012/03/08 12:38:46 kls Exp $
|
* $Id: menuitems.h 2.8 2012/03/13 11:19:11 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MENUITEMS_H
|
#ifndef __MENUITEMS_H
|
||||||
@ -163,6 +163,7 @@ private:
|
|||||||
time_t *value;
|
time_t *value;
|
||||||
int *weekdays;
|
int *weekdays;
|
||||||
time_t oldvalue;
|
time_t oldvalue;
|
||||||
|
int oldweekdays;
|
||||||
int dayindex;
|
int dayindex;
|
||||||
int FindDayIndex(int WeekDays);
|
int FindDayIndex(int WeekDays);
|
||||||
virtual void Set(void);
|
virtual void Set(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user