summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-18 17:11:36 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-19 11:38:07 +0200
commitfb165b2b431fa14c45ba19c869ff4a387339da48 (patch)
treec56c98fe20c3d1f75e510c637d457c5436a50637
parente31070cd76259a9fd29bbb0899f3221f6a913a05 (diff)
downloadvdr-plugin-tvguide-fb165b2b431fa14c45ba19c869ff4a387339da48.tar.gz
vdr-plugin-tvguide-fb165b2b431fa14c45ba19c869ff4a387339da48.tar.bz2
Rework cRecMenuItemTime
-rw-r--r--recmenuitem.c3
-rw-r--r--recmenuitem.h1
-rw-r--r--recmenus.c16
3 files changed, 9 insertions, 11 deletions
diff --git a/recmenuitem.c b/recmenuitem.c
index 293cd6e..ab0a10a 100644
--- a/recmenuitem.c
+++ b/recmenuitem.c
@@ -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;
diff --git a/recmenuitem.h b/recmenuitem.h
index 8c88710..2300e26 100644
--- a/recmenuitem.h
+++ b/recmenuitem.h
@@ -371,7 +371,6 @@ private:
void DrawValue(void);
public:
cRecMenuItemTime(cString text,
- int initialVal,
bool active = false,
int *callback = NULL,
eRecMenuState action = rmsNotConsumed);
diff --git a/recmenus.c b/recmenus.c
index cfe276e..239df79 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -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)