mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Rework indent & refresh
This commit is contained in:
parent
b7970e5723
commit
a1aa300259
@ -300,19 +300,15 @@ cRecMenuItemInt::cRecMenuItemInt(cString text,
|
||||
int initialVal,
|
||||
int minVal,
|
||||
int maxVal,
|
||||
// bool refresh;
|
||||
bool active,
|
||||
int *callback,
|
||||
eRecMenuState action,
|
||||
int indent) {
|
||||
eRecMenuState action) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
this->currentVal = initialVal;
|
||||
this->minVal = minVal;
|
||||
this->maxVal = maxVal;
|
||||
// this->refresh = refresh;
|
||||
this->active = active;
|
||||
this->indent = indent;
|
||||
this->callback = callback;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
@ -352,7 +348,7 @@ void cRecMenuItemInt::setBackground() {
|
||||
|
||||
void cRecMenuItemInt::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawValue();
|
||||
}
|
||||
|
||||
@ -411,18 +407,16 @@ eRecMenuState cRecMenuItemInt::ProcessKey(eKeys Key) {
|
||||
// --- cRecMenuItemBool -------------------------------------------------------
|
||||
cRecMenuItemBool::cRecMenuItemBool(cString text,
|
||||
bool initialVal,
|
||||
bool refresh,
|
||||
bool active,
|
||||
bool *callback,
|
||||
eRecMenuState action,
|
||||
int indent) {
|
||||
bool refresh) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
this->yes = initialVal;
|
||||
this->refresh = refresh;
|
||||
this->active = active;
|
||||
this->callback = callback;
|
||||
this->indent = indent;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
pixmapVal = NULL;
|
||||
@ -430,18 +424,16 @@ cRecMenuItemBool::cRecMenuItemBool(cString text,
|
||||
|
||||
cRecMenuItemBool::cRecMenuItemBool(cString text,
|
||||
bool initialVal,
|
||||
bool refresh,
|
||||
bool active,
|
||||
int *callback,
|
||||
eRecMenuState action,
|
||||
int indent) {
|
||||
bool refresh) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
this->yes = initialVal;
|
||||
this->refresh = refresh;
|
||||
this->active = active;
|
||||
this->callback = (bool*)callback;
|
||||
this->indent = indent;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
pixmapVal = NULL;
|
||||
@ -474,13 +466,13 @@ void cRecMenuItemBool::Show(void) {
|
||||
|
||||
void cRecMenuItemBool::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawValue();
|
||||
}
|
||||
|
||||
void cRecMenuItemBool::DrawValue(void) {
|
||||
pixmapVal->Fill(clrTransparent);
|
||||
std::string strIcon = yes?"yes":"no";
|
||||
std::string strIcon = yes ? "yes" : "no";
|
||||
int iconSize = height - 8;
|
||||
int iconX = width - iconSize - 10;
|
||||
int iconY = (height - iconSize) / 2;
|
||||
@ -519,8 +511,7 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
|
||||
bool active,
|
||||
int *callback,
|
||||
eRecMenuState action,
|
||||
bool refresh,
|
||||
int indent) {
|
||||
bool refresh) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
strings = Strings;
|
||||
@ -532,7 +523,6 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
|
||||
this->active = active;
|
||||
this->callback = callback;
|
||||
this->refresh = refresh;
|
||||
this->indent = indent;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
pixmapVal = NULL;
|
||||
@ -565,7 +555,7 @@ void cRecMenuItemSelect::Show(void) {
|
||||
|
||||
void cRecMenuItemSelect::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawValue();
|
||||
}
|
||||
|
||||
@ -629,14 +619,12 @@ cRecMenuItemSelectDirectory::cRecMenuItemSelectDirectory(cString text,
|
||||
bool active,
|
||||
char *callback,
|
||||
eRecMenuState action,
|
||||
bool isSearchTimer,
|
||||
int indent) {
|
||||
bool isSearchTimer) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
this->originalFolder = originalFolder;
|
||||
this->active = active;
|
||||
this->callback = callback;
|
||||
this->indent = indent;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
pixmapVal = NULL;
|
||||
@ -675,14 +663,14 @@ void cRecMenuItemSelectDirectory::Show(void) {
|
||||
|
||||
void cRecMenuItemSelectDirectory::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawValue();
|
||||
}
|
||||
|
||||
void cRecMenuItemSelectDirectory::DrawValue(void) {
|
||||
pixmapVal->Fill(clrTransparent);
|
||||
int iconSize = min(128, height);
|
||||
int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + indent * 30 + font->Width(*text) + 2 * iconSize);
|
||||
int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + font->Width(*text) + 2 * iconSize);
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight);
|
||||
int iconLeftX = textX - iconSize;
|
||||
@ -1326,8 +1314,7 @@ cRecMenuItemTime::cRecMenuItemTime(cString text,
|
||||
int initialVal,
|
||||
bool active,
|
||||
int *callback,
|
||||
eRecMenuState action,
|
||||
int indent) {
|
||||
eRecMenuState action) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
this->value = initialVal;
|
||||
@ -1337,7 +1324,6 @@ cRecMenuItemTime::cRecMenuItemTime(cString text,
|
||||
fresh = true;
|
||||
this->active = active;
|
||||
this->callback = callback;
|
||||
this->indent = indent;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
pixmapVal = NULL;
|
||||
@ -1370,7 +1356,7 @@ void cRecMenuItemTime::Show(void) {
|
||||
|
||||
void cRecMenuItemTime::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawValue();
|
||||
}
|
||||
|
||||
@ -1960,8 +1946,7 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
|
||||
const cChannel *initialChannel,
|
||||
bool active,
|
||||
int *callback,
|
||||
eRecMenuState action,
|
||||
int indent) {
|
||||
eRecMenuState action) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
this->channel = initialChannel;
|
||||
@ -1973,10 +1958,8 @@ cRecMenuItemChannelChooser::cRecMenuItemChannelChooser(cString text,
|
||||
fresh = true;
|
||||
this->active = active;
|
||||
this->callback = callback;
|
||||
this->indent = indent;
|
||||
this->action = action;
|
||||
height = 3 * font->Height() / 2;
|
||||
// height = 2 * font->Height();
|
||||
pixmapChannel = NULL;
|
||||
}
|
||||
|
||||
@ -2007,7 +1990,7 @@ void cRecMenuItemChannelChooser::Show(void) {
|
||||
|
||||
void cRecMenuItemChannelChooser::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawValue();
|
||||
}
|
||||
|
||||
@ -2137,8 +2120,7 @@ eRecMenuState cRecMenuItemChannelChooser::ProcessKey(eKeys Key) {
|
||||
cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text,
|
||||
int weekdays,
|
||||
bool active,
|
||||
int *callback,
|
||||
int indent) {
|
||||
int *callback) {
|
||||
selectable = true;
|
||||
this->text = text;
|
||||
if (weekdays < 1)
|
||||
@ -2146,7 +2128,6 @@ cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text,
|
||||
this->weekdays = weekdays;
|
||||
this->active = active;
|
||||
this->callback = callback;
|
||||
this->indent = indent;
|
||||
height = 3 * font->Height() / 2;
|
||||
selectedDay = 0;
|
||||
pixmapWeekdays = NULL;
|
||||
@ -2209,7 +2190,7 @@ void cRecMenuItemDayChooser::setBackground() {
|
||||
|
||||
void cRecMenuItemDayChooser::Draw(void) {
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmap->DrawText(cPoint(10 + indent * 30, textY), *text, colorText, colorTextBack, font);
|
||||
pixmap->DrawText(cPoint(10, textY), *text, colorText, colorTextBack, font);
|
||||
DrawDays();
|
||||
}
|
||||
|
||||
|
@ -194,8 +194,6 @@ private:
|
||||
int *callback;
|
||||
int minVal;
|
||||
int maxVal;
|
||||
// bool refresh;
|
||||
int indent;
|
||||
cPixmap *pixmapVal;
|
||||
bool fresh;
|
||||
void DrawValue(void);
|
||||
@ -204,11 +202,9 @@ public:
|
||||
int initialVal,
|
||||
int minVal,
|
||||
int maxVal,
|
||||
// bool refresh = false,
|
||||
bool active = false,
|
||||
int *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
int indent = 0);
|
||||
eRecMenuState action = rmsNotConsumed);
|
||||
virtual ~cRecMenuItemInt(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
@ -224,7 +220,6 @@ class cRecMenuItemBool : public cRecMenuItem {
|
||||
private:
|
||||
cString text;
|
||||
bool yes;
|
||||
int indent;
|
||||
bool *callback;
|
||||
cPixmap *pixmapVal;
|
||||
bool refresh;
|
||||
@ -232,18 +227,16 @@ private:
|
||||
public:
|
||||
cRecMenuItemBool(cString text,
|
||||
bool initialVal,
|
||||
bool refresh = false,
|
||||
bool active = false,
|
||||
bool *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
int indent = 0);
|
||||
bool refresh = false);
|
||||
cRecMenuItemBool(cString text,
|
||||
bool initialVal,
|
||||
bool refresh = false,
|
||||
bool active = false,
|
||||
int *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
int indent = 0);
|
||||
bool refresh = false);
|
||||
virtual ~cRecMenuItemBool(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
@ -260,7 +253,6 @@ private:
|
||||
int currentVal;
|
||||
int *callback;
|
||||
bool refresh;
|
||||
int indent;
|
||||
std::vector<std::string> strings;
|
||||
int numValues;
|
||||
cPixmap *pixmapVal;
|
||||
@ -272,8 +264,7 @@ public:
|
||||
bool active = false,
|
||||
int *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
bool refresh = false,
|
||||
int indent = 0);
|
||||
bool refresh = false);
|
||||
virtual ~cRecMenuItemSelect(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
@ -292,7 +283,6 @@ private:
|
||||
std::vector<std::string> folders;
|
||||
int currentVal;
|
||||
char *callback;
|
||||
int indent;
|
||||
int numValues;
|
||||
cPixmap *pixmapVal;
|
||||
void DrawValue(void);
|
||||
@ -304,8 +294,7 @@ public:
|
||||
bool active = false,
|
||||
char *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
bool isSearchTimer = false,
|
||||
int indent = 0);
|
||||
bool isSearchTimer = false);
|
||||
virtual ~cRecMenuItemSelectDirectory(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
@ -379,7 +368,6 @@ private:
|
||||
cString text;
|
||||
int value;
|
||||
int *callback;
|
||||
int indent;
|
||||
int mm;
|
||||
int hh;
|
||||
int pos;
|
||||
@ -391,8 +379,7 @@ public:
|
||||
int initialVal,
|
||||
bool active = false,
|
||||
int *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
int indent = 0);
|
||||
eRecMenuState action = rmsNotConsumed);
|
||||
virtual ~cRecMenuItemTime(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
@ -512,7 +499,6 @@ private:
|
||||
const cChannel *channel;
|
||||
int channelNumber;
|
||||
int *callback;
|
||||
int indent;
|
||||
bool initialChannelSet;
|
||||
bool fresh;
|
||||
cPixmap *pixmapChannel;
|
||||
@ -522,8 +508,7 @@ public:
|
||||
const cChannel *initialChannel,
|
||||
bool active = false,
|
||||
int *callback = NULL,
|
||||
eRecMenuState action = rmsNotConsumed,
|
||||
int indent = 0);
|
||||
eRecMenuState action = rmsNotConsumed);
|
||||
virtual ~cRecMenuItemChannelChooser(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
@ -539,7 +524,6 @@ private:
|
||||
cString text;
|
||||
int weekdays;
|
||||
int *callback;
|
||||
int indent;
|
||||
bool epgsearchMode;
|
||||
std::string days;
|
||||
int daysX;
|
||||
@ -557,8 +541,7 @@ public:
|
||||
cRecMenuItemDayChooser (cString text,
|
||||
int weekdays,
|
||||
bool active = false,
|
||||
int *callback = NULL,
|
||||
int indent = 0);
|
||||
int *callback = NULL);
|
||||
virtual ~cRecMenuItemDayChooser(void);
|
||||
void SetPixmaps(void);
|
||||
void Hide(void);
|
||||
|
107
recmenus.c
107
recmenus.c
@ -444,7 +444,7 @@ cRecMenuEditTimer::cRecMenuEditTimer(const cTimer *timer, eRecMenuState nextStat
|
||||
lifetime = timer->Lifetime();
|
||||
strncpy(folder, GetDirectoryFromTimer(timer->File()).c_str(), TEXTINPUTLENGTH);
|
||||
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, true, &timerActive));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Timer Active"), timerActive, true, &timerActive));
|
||||
AddMenuItemInitial(new cRecMenuItemInt(tr("Priority"), prio, 0, MAXPRIORITY, false, &prio));
|
||||
AddMenuItemInitial(new cRecMenuItemInt(tr("Lifetime"), lifetime, 0, MAXLIFETIME, false, &lifetime));
|
||||
AddMenuItemInitial(new cRecMenuItemDay(tr("Day"), day, false, &day));
|
||||
@ -522,7 +522,7 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const c
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
SetHeader(infoItem);
|
||||
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, false, &timerActive));
|
||||
AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), timerActive, false, &timerActive));
|
||||
#if VDRVERSNUM >= 20301
|
||||
AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), initialChannel, false, &channel));
|
||||
#else
|
||||
@ -728,6 +728,7 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
|
||||
std::string dir = sT.directory;
|
||||
strncpy(directory, dir.c_str(), TEXTINPUTLENGTH);
|
||||
dayOfWeek = DayOfWeek(sT.dayOfWeek);
|
||||
indent = " ";
|
||||
|
||||
sT.GetSearchModes(&searchModes);
|
||||
sT.GetUseChannelModes(&useChannelModes);
|
||||
@ -815,16 +816,16 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
|
||||
}
|
||||
|
||||
mainMenuItems.push_back(new cRecMenuItemText(tr("Search term"), searchString, TEXTINPUTLENGTH, init, searchString));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), sT.useAsSearchTimer, true, false, &sT.useAsSearchTimer, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), sT.useAsSearchTimer, false, &sT.useAsSearchTimer, rmsSearchTimerSave, true));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search mode"), searchModes, sT.mode, false, &sT.mode, rmsSearchTimerSave, true));
|
||||
if (sT.mode == 5) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Tolerance"), sT.fuzzyTolerance, 1, 9, false, &sT.fuzzyTolerance, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s", *indent, tr("Tolerance")), sT.fuzzyTolerance, 1, 9, false, &sT.fuzzyTolerance, rmsSearchTimerSave));
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Match case"), sT.useCase, false, false, &sT.useCase, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use title"), sT.useTitle, false, false, &sT.useTitle, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use subtitle"), sT.useSubtitle, false, false, &sT.useSubtitle, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use description"), sT.useDescription, false, false, &sT.useDescription, rmsSearchTimerSave));
|
||||
// mainMenuItems.push_back(new cRecMenuItemBool(tr("Use content descriptor"), sT.useContentDescriptors, false, false, &sT.useContentDescriptors, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Match case"), sT.useCase, false, &sT.useCase, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use title"), sT.useTitle, false, &sT.useTitle, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use subtitle"), sT.useSubtitle, false, &sT.useSubtitle, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use description"), sT.useDescription, false, &sT.useDescription, rmsSearchTimerSave));
|
||||
// mainMenuItems.push_back(new cRecMenuItemBool(tr("Use content descriptor"), sT.useContentDescriptors, false, &sT.useContentDescriptors, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Use channel"), useChannelModes, sT.useChannel, false, &sT.useChannel, rmsSearchTimerSave, true));
|
||||
if (sT.useChannel == 1) {
|
||||
startChannel = (sT.channelMin) ? sT.channelMin->Number() : 0;
|
||||
@ -834,74 +835,74 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(tr("from channel"), Channels->GetByNumber(startChannel), false, &startChannel, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(tr("to channel"), Channels->GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(cString::sprintf("%s%s", *indent, tr("from channel")), Channels->GetByNumber(startChannel), false, &startChannel, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(cString::sprintf("%s%s", *indent, tr("to channel")), Channels->GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
|
||||
}
|
||||
#else
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(tr("from channel"), Channels.GetByNumber(startChannel), false, &startChannel, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(tr("to channel"), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(cString::sprintf("%s%s", *indent, tr("from channel")), Channels.GetByNumber(startChannel), false, &startChannel, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemChannelChooser(cString::sprintf("%s%s", *indent, tr("to channel")), Channels.GetByNumber(stopChannel), false, &stopChannel, rmsSearchTimerSave));
|
||||
#endif
|
||||
}
|
||||
else if ((sT.useChannel == 2) && (channelgroups.size() > 0)) {
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Channel group"), channelgroups, channelgroupIndex, false, &channelgroupIndex, rmsSearchTimerSave, false, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(cString::sprintf("%s%s", *indent, tr("Channel group")), channelgroups, channelgroupIndex, false, &channelgroupIndex, rmsSearchTimerSave, false));
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use time"), sT.useTime, true, false, &sT.useTime, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use time"), sT.useTime, false, &sT.useTime, rmsSearchTimerSave, true));
|
||||
if (sT.useTime) {
|
||||
mainMenuItems.push_back(new cRecMenuItemTime(tr("Start after"), sT.startTime, false, &sT.startTime, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemTime(tr("Start before"), sT.stopTime, false, &sT.stopTime, rmsSearchTimerSave, 1));
|
||||
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 cRecMenuItemBool(tr("Use duration"), sT.useDuration, true, false, &sT.useDuration, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use duration"), sT.useDuration, false, &sT.useDuration, rmsSearchTimerSave, true));
|
||||
if (sT.useDuration) {
|
||||
mainMenuItems.push_back(new cRecMenuItemTime(tr("Min. duration"), sT.minDuration, false, &sT.minDuration, rmsSearchTimerSave, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemTime(tr("Max. duration"), sT.maxDuration, false, &sT.maxDuration, rmsSearchTimerSave, 1));
|
||||
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 cRecMenuItemBool(tr("Use day of week"), sT.useDayOfWeek, true, false, &sT.useDayOfWeek, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use day of week"), sT.useDayOfWeek, false, &sT.useDayOfWeek, rmsSearchTimerSave, true));
|
||||
if (sT.useDayOfWeek)
|
||||
mainMenuItems.push_back(new cRecMenuItemDayChooser(tr("Day of week"), dayOfWeek, false, &dayOfWeek, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use in Favorites"), sT.useInFavorites, false, false, &sT.useInFavorites, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use as search timer"), sT.useAsSearchTimer, true, false, &sT.useAsSearchTimer, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemDayChooser(cString::sprintf("%s%s", *indent, tr("Day of week")), dayOfWeek, false, &dayOfWeek));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use in Favorites"), sT.useInFavorites, false, &sT.useInFavorites, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use as search timer"), sT.useAsSearchTimer, false, &sT.useAsSearchTimer, rmsSearchTimerSave, true));
|
||||
if (sT.useAsSearchTimer) {
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Action"), searchTimerModes, sT.action, false, &sT.action, rmsSearchTimerSave, true, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(cString::sprintf("%s%s", *indent, tr("Action")), searchTimerModes, sT.action, false, &sT.action, rmsSearchTimerSave, true));
|
||||
if (sT.action == searchTimerActionSwitchOnly) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Switch ... minutes before start"), sT.switchMinsBefore, 0, 99, false, &sT.switchMinsBefore, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Unmute sound"), sT.unmuteSoundOnSwitch, false, false, &sT.unmuteSoundOnSwitch, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Switch ... minutes before start")), sT.switchMinsBefore, 0, 99, false, &sT.switchMinsBefore, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s", *indent, *indent, tr("Unmute sound")), sT.unmuteSoundOnSwitch, false, &sT.unmuteSoundOnSwitch, rmsSearchTimerSave));
|
||||
}
|
||||
if (sT.action == searchTimerActionAnnounceAndSwitch) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Ask ... minutes before start"), sT.switchMinsBefore, 0, 99, false, &sT.switchMinsBefore, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Unmute sound"), sT.unmuteSoundOnSwitch, false, false, &sT.unmuteSoundOnSwitch, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Ask ... minutes before start")), sT.switchMinsBefore, 0, 99, false, &sT.switchMinsBefore, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s", *indent, *indent, tr("Unmute sound")), sT.unmuteSoundOnSwitch, false, &sT.unmuteSoundOnSwitch, rmsSearchTimerSave));
|
||||
}
|
||||
if ((sT.action == searchTimerActionRecord) || (sT.action == searchTimerActionInactiveRecord)) {
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Series Recording"), sT.useEpisode, false, false, &sT.useEpisode, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelectDirectory(tr("Directory"), std::string(directory), false, directory, rmsSearchTimerSave, true, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Delete recordings after ... days"), sT.delAfterDays, 0, 999, false, &sT.delAfterDays, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s", *indent, *indent, tr("Series Recording")), sT.useEpisode, false, &sT.useEpisode, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelectDirectory(cString::sprintf("%s%s%s", *indent, *indent, tr("Directory")), std::string(directory), false, directory, rmsSearchTimerSave, true));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Delete recordings after ... days")), sT.delAfterDays, 0, 999, false, &sT.delAfterDays, rmsSearchTimerSave));
|
||||
if (sT.delAfterDays > 0) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Keep ... recordings"), sT.recordingsKeep, 0, 999, false, &sT.recordingsKeep, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("Keep ... recordings")), sT.recordingsKeep, 0, 999, false, &sT.recordingsKeep, rmsSearchTimerSave));
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Pause when ... recordings exist"), sT.pauseOnNrRecordings, 0, 999, false, &sT.pauseOnNrRecordings, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Avoid Repeats"), sT.avoidRepeats, true, false, &sT.avoidRepeats, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Pause when ... recordings exist")), sT.pauseOnNrRecordings, 0, 999, false, &sT.pauseOnNrRecordings, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s", *indent, *indent, tr("Avoid Repeats")), sT.avoidRepeats, false, &sT.avoidRepeats, rmsSearchTimerSave, true));
|
||||
if (sT.avoidRepeats) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Allowed repeats"), sT.allowedRepeats, 0, 99, false, &sT.allowedRepeats, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("Allowed repeats")), sT.allowedRepeats, 0, 99, false, &sT.allowedRepeats, rmsSearchTimerSave));
|
||||
if (sT.allowedRepeats > 0) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Only repeats within ... days"), sT.repeatsWithinDays, 0, 999, false, &sT.repeatsWithinDays, rmsSearchTimerSave, 4));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s%s%s", *indent, *indent, *indent, *indent, tr("Only repeats within ... days")), sT.repeatsWithinDays, 0, 999, false, &sT.repeatsWithinDays, rmsSearchTimerSave));
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Compare Title"), sT.compareTitle, false, false, &sT.compareTitle, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Compare Subtitle"), sT.compareSubtitle, false, false, &sT.compareSubtitle, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Compare Description"), sT.compareSummary, true, false, &sT.compareSummary, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("Compare Title")), sT.compareTitle, false, &sT.compareTitle, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("Compare Subtitle")), sT.compareSubtitle, false, &sT.compareSubtitle, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("Compare Description")), sT.compareSummary, false, &sT.compareSummary, rmsSearchTimerSave, true));
|
||||
if (sT.compareSummary) {
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Min. match in %"), sT.compareSummaryMatchInPercent, 1, 100, false, &sT.compareSummaryMatchInPercent, rmsSearchTimerSave, 4));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s%s%s", *indent, *indent, *indent, *indent, tr("Min. match in %")), sT.compareSummaryMatchInPercent, 1, 100, false, &sT.compareSummaryMatchInPercent, rmsSearchTimerSave));
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Compare date"), compareDateModes, sT.compareDate, false, &sT.compareDate, rmsSearchTimerSave, false, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("Compare date")), compareDateModes, sT.compareDate, false, &sT.compareDate, rmsSearchTimerSave, false));
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Priority"), sT.priority, 0, 99, false, &sT.priority, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Lifetime"), sT.lifetime, 0, 99, false, &sT.lifetime, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Time margin for start in minutes"), sT.marginStart, 0, 30, false, &sT.marginStart, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("Time margin for stop in minutes"), sT.marginStop, 0, 30, false, &sT.marginStop, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use VPS"), sT.useVPS, false, false, &sT.useVPS, rmsSearchTimerSave, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Auto delete"), delModes, sT.delMode, false, &sT.delMode, rmsSearchTimerSave, true, 2));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Priority")), sT.priority, 0, 99, false, &sT.priority, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Lifetime")), sT.lifetime, 0, 99, false, &sT.lifetime, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Time margin for start in minutes")), sT.marginStart, 0, 30, false, &sT.marginStart, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s", *indent, *indent, tr("Time margin for stop in minutes")), sT.marginStop, 0, 30, false, &sT.marginStop, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(cString::sprintf("%s%s%s", *indent, *indent, tr("Use VPS")), sT.useVPS, false, &sT.useVPS, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemSelect(cString::sprintf("%s%s%s", *indent, *indent, tr("Auto delete")), delModes, sT.delMode, false, &sT.delMode, rmsSearchTimerSave, true));
|
||||
if (sT.delMode == 1)
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("after ... recordings"), sT.delAfterCountRecs, 0, 999, false, &sT.delAfterCountRecs, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("after ... recordings")), sT.delAfterCountRecs, 0, 999, false, &sT.delAfterCountRecs, rmsSearchTimerSave));
|
||||
else if (sT.delMode == 2)
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(tr("after ... days after first rec."), sT.delAfterDaysOfFirstRec, 0, 999, false, &sT.delAfterDaysOfFirstRec, rmsSearchTimerSave, 3));
|
||||
mainMenuItems.push_back(new cRecMenuItemInt(cString::sprintf("%s%s%s%s", *indent, *indent, *indent, tr("after ... days after first rec.")), sT.delAfterDaysOfFirstRec, 0, 999, false, &sT.delAfterDaysOfFirstRec, rmsSearchTimerSave));
|
||||
}
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemButton(tr("Display Results for Search Timer"), rmsSearchTimerTest, false));
|
||||
@ -1211,9 +1212,9 @@ cRecMenuSearch::cRecMenuSearch(std::string searchString, bool withOptions) {
|
||||
searchTimer.GetSearchModes(&searchModes);
|
||||
AddMenuItemInitial(new cRecMenuItemSelect(tr("Search Mode"), searchModes, 0, false, &mode));
|
||||
AddMenuItemInitial(new cRecMenuItemChannelChooser(tr("Channel to Search"), NULL, false, &channelNr));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in title"), true, false, false, &useTitle));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in Subtitle"), true, false, false, &useSubTitle));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in Description"), false, false, false, &useDescription));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in title"), true, false, &useTitle));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in Subtitle"), true, false, &useSubTitle));
|
||||
AddMenuItemInitial(new cRecMenuItemBool(tr("Search in Description"), false, false, &useDescription));
|
||||
} else {
|
||||
AddMenuItemInitial(new cRecMenuItemButton(tr("Show Search Options"), rmsSearchWithOptions, false));
|
||||
}
|
||||
|
@ -216,7 +216,6 @@ public:
|
||||
// --- cRecMenuSearchTimerEdit ---------------------------------------------------------
|
||||
class cRecMenuSearchTimerEdit: public cRecMenu {
|
||||
private:
|
||||
cTVGuideSearchTimer searchTimer;
|
||||
cTVGuideSearchTimer sT;
|
||||
std::vector<std::string> searchModes;
|
||||
std::vector<std::string> useChannelModes;
|
||||
@ -226,6 +225,7 @@ private:
|
||||
std::vector<std::string> delModes;
|
||||
std::vector<std::string> channelgroups;
|
||||
std::vector<cRecMenuItem*> mainMenuItems;
|
||||
cString indent;
|
||||
bool init;
|
||||
int numMenuItems;
|
||||
int useChannelPos;
|
||||
|
Loading…
Reference in New Issue
Block a user