Rework cRecMenuItemTime

This commit is contained in:
kamel5 2019-07-18 17:11:36 +02:00
parent e31070cd76
commit fb165b2b43
3 changed files with 9 additions and 11 deletions

View File

@ -1305,13 +1305,12 @@ eRecMenuState cRecMenuItemText::ProcessKey(eKeys Key) {
// --- cRecMenuItemTime -------------------------------------------------------
cRecMenuItemTime::cRecMenuItemTime(cString text,
int initialVal,
bool active,
int *callback,
eRecMenuState action) {
selectable = true;
this->text = text;
this->value = initialVal;
this->value = *callback;
hh = value / 100;
mm = value % 100;
pos = 0;

View File

@ -371,7 +371,6 @@ private:
void DrawValue(void);
public:
cRecMenuItemTime(cString text,
int initialVal,
bool active = false,
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);

View File

@ -448,8 +448,8 @@ cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextStat
AddMenuItemInitial(new cRecMenuItemInt(tr("Priority"), 0, MAXPRIORITY, false, &prio));
AddMenuItemInitial(new cRecMenuItemInt(tr("Lifetime"), 0, MAXLIFETIME, false, &lifetime));
AddMenuItemInitial(new cRecMenuItemDay(tr("Day"), day, false, &day));
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer start time"), start, false, &start));
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer stop time"), stop, false, &stop));
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer start time"), false, &start));
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer stop time"), false, &stop));
cString fileInfo = cString::sprintf("%s:\n%s", tr("Timer File"), timer->File());
cRecMenuItemInfo *fileInfoItem = new cRecMenuItemInfo(*fileInfo, false);
fileInfoItem->CalculateHeight(width - 2 * border);
@ -524,8 +524,8 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const c
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), false, &timerActive));
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), false, &channel));
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), start, false, &start));
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), stop, false, &stop));
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), false, &start));
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), false, &stop));
AddMenuItem(new cRecMenuItemDayChooser(tr("Days to record"), dayOfWeek, false, &dayOfWeek));
AddMenuItem(new cRecMenuItemDay(tr("Day to start"), tstart, false, &tstart));
AddMenuItem(new cRecMenuItemInt(tr("Priority"), 0, MAXPRIORITY, false, &priority));
@ -839,13 +839,13 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
}
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use time"), false, &sT.useTime, rmsSearchTimerSave, true));
if (sT.useTime) {
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Start after")), sT.startTime, false, &sT.startTime, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Start before")), sT.stopTime, false, &sT.stopTime, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Start after")), false, &sT.startTime, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Start before")), false, &sT.stopTime, rmsSearchTimerSave));
}
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use duration"), false, &sT.useDuration, rmsSearchTimerSave, true));
if (sT.useDuration) {
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Min. duration")), sT.minDuration, false, &sT.minDuration, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Max. duration")), sT.maxDuration, false, &sT.maxDuration, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Min. duration")), false, &sT.minDuration, rmsSearchTimerSave));
mainMenuItems.push_back(new cRecMenuItemTime(cString::sprintf("%s%s", *indent, tr("Max. duration")), false, &sT.maxDuration, rmsSearchTimerSave));
}
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use day of week"), false, &sT.useDayOfWeek, rmsSearchTimerSave, true));
if (sT.useDayOfWeek)