From b17fd9b7aa5aef6327b67c9caedf858a6cf859f2 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Thu, 18 Jul 2019 17:13:58 +0200 Subject: [PATCH] Rework cRecMenuItemDay --- recmenuitem.c | 3 +-- recmenuitem.h | 1 - recmenus.c | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/recmenuitem.c b/recmenuitem.c index ab0a10a..41d5237 100644 --- a/recmenuitem.c +++ b/recmenuitem.c @@ -1448,13 +1448,12 @@ eRecMenuState cRecMenuItemTime::ProcessKey(eKeys Key) { // --- cRecMenuItemDay ------------------------------------------------------- cRecMenuItemDay::cRecMenuItemDay(cString text, - time_t initialVal, bool active, time_t *callback, eRecMenuState action) { selectable = true; this->text = text; - this->currentVal = cTimer::SetTime(initialVal, 0); + this->currentVal = cTimer::SetTime(*callback, 0); this->active = active; this->callback = callback; this->action = action; diff --git a/recmenuitem.h b/recmenuitem.h index 2300e26..436d35f 100644 --- a/recmenuitem.h +++ b/recmenuitem.h @@ -393,7 +393,6 @@ private: void DrawValue(void); public: cRecMenuItemDay(cString text, - time_t initialVal, bool active = false, time_t *callback = NULL, eRecMenuState action = rmsNotConsumed); diff --git a/recmenus.c b/recmenus.c index 239df79..9456adf 100644 --- a/recmenus.c +++ b/recmenus.c @@ -447,7 +447,7 @@ cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextStat AddMenuItemInitial(new cRecMenuItemBool(tr("Timer Active"), true, &timerActive)); 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 cRecMenuItemDay(tr("Day"), false, &day)); 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()); @@ -527,7 +527,7 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const c 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 cRecMenuItemDay(tr("Day to start"), false, &tstart)); AddMenuItem(new cRecMenuItemInt(tr("Priority"), 0, MAXPRIORITY, false, &priority)); AddMenuItem(new cRecMenuItemInt(tr("Lifetime"), 0, MAXLIFETIME, false, &lifetime));