mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Rework cRecMenuItemTime
This commit is contained in:
parent
e31070cd76
commit
fb165b2b43
@ -1305,13 +1305,12 @@ eRecMenuState cRecMenuItemText::ProcessKey(eKeys Key) {
|
|||||||
|
|
||||||
// --- cRecMenuItemTime -------------------------------------------------------
|
// --- cRecMenuItemTime -------------------------------------------------------
|
||||||
cRecMenuItemTime::cRecMenuItemTime(cString text,
|
cRecMenuItemTime::cRecMenuItemTime(cString text,
|
||||||
int initialVal,
|
|
||||||
bool active,
|
bool active,
|
||||||
int *callback,
|
int *callback,
|
||||||
eRecMenuState action) {
|
eRecMenuState action) {
|
||||||
selectable = true;
|
selectable = true;
|
||||||
this->text = text;
|
this->text = text;
|
||||||
this->value = initialVal;
|
this->value = *callback;
|
||||||
hh = value / 100;
|
hh = value / 100;
|
||||||
mm = value % 100;
|
mm = value % 100;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
|
@ -371,7 +371,6 @@ private:
|
|||||||
void DrawValue(void);
|
void DrawValue(void);
|
||||||
public:
|
public:
|
||||||
cRecMenuItemTime(cString text,
|
cRecMenuItemTime(cString text,
|
||||||
int initialVal,
|
|
||||||
bool active = false,
|
bool active = false,
|
||||||
int *callback = NULL,
|
int *callback = NULL,
|
||||||
eRecMenuState action = rmsNotConsumed);
|
eRecMenuState action = rmsNotConsumed);
|
||||||
|
16
recmenus.c
16
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("Priority"), 0, MAXPRIORITY, false, &prio));
|
||||||
AddMenuItemInitial(new cRecMenuItemInt(tr("Lifetime"), 0, MAXLIFETIME, false, &lifetime));
|
AddMenuItemInitial(new cRecMenuItemInt(tr("Lifetime"), 0, MAXLIFETIME, false, &lifetime));
|
||||||
AddMenuItemInitial(new cRecMenuItemDay(tr("Day"), day, false, &day));
|
AddMenuItemInitial(new cRecMenuItemDay(tr("Day"), day, false, &day));
|
||||||
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer start time"), start, false, &start));
|
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer start time"), false, &start));
|
||||||
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer stop time"), stop, false, &stop));
|
AddMenuItemInitial(new cRecMenuItemTime(tr("Timer stop time"), false, &stop));
|
||||||
cString fileInfo = cString::sprintf("%s:\n%s", tr("Timer File"), timer->File());
|
cString fileInfo = cString::sprintf("%s:\n%s", tr("Timer File"), timer->File());
|
||||||
cRecMenuItemInfo *fileInfoItem = new cRecMenuItemInfo(*fileInfo, false);
|
cRecMenuItemInfo *fileInfoItem = new cRecMenuItemInfo(*fileInfo, false);
|
||||||
fileInfoItem->CalculateHeight(width - 2 * border);
|
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 cRecMenuItemBool(tr("Timer Active"), false, &timerActive));
|
||||||
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), false, &channel));
|
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), false, &channel));
|
||||||
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), start, false, &start));
|
AddMenuItem(new cRecMenuItemTime(tr("Series Timer start time"), false, &start));
|
||||||
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), stop, false, &stop));
|
AddMenuItem(new cRecMenuItemTime(tr("Series Timer stop time"), false, &stop));
|
||||||
AddMenuItem(new cRecMenuItemDayChooser(tr("Days to record"), dayOfWeek, false, &dayOfWeek));
|
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"), tstart, false, &tstart));
|
||||||
AddMenuItem(new cRecMenuItemInt(tr("Priority"), 0, MAXPRIORITY, false, &priority));
|
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));
|
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use time"), false, &sT.useTime, rmsSearchTimerSave, true));
|
||||||
if (sT.useTime) {
|
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 after")), 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 before")), false, &sT.stopTime, rmsSearchTimerSave));
|
||||||
}
|
}
|
||||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use duration"), false, &sT.useDuration, rmsSearchTimerSave, true));
|
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use duration"), false, &sT.useDuration, rmsSearchTimerSave, true));
|
||||||
if (sT.useDuration) {
|
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("Min. duration")), 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("Max. duration")), false, &sT.maxDuration, rmsSearchTimerSave));
|
||||||
}
|
}
|
||||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use day of week"), false, &sT.useDayOfWeek, rmsSearchTimerSave, true));
|
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use day of week"), false, &sT.useDayOfWeek, rmsSearchTimerSave, true));
|
||||||
if (sT.useDayOfWeek)
|
if (sT.useDayOfWeek)
|
||||||
|
Loading…
Reference in New Issue
Block a user