mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Rework cRecMenuItemText
This commit is contained in:
parent
15ce11db5f
commit
e31070cd76
@ -733,13 +733,12 @@ int cRecMenuItemSelectDirectory::GetInitial(void) {
|
|||||||
|
|
||||||
// --- cRecMenuItemText -------------------------------------------------------
|
// --- cRecMenuItemText -------------------------------------------------------
|
||||||
cRecMenuItemText::cRecMenuItemText(cString title,
|
cRecMenuItemText::cRecMenuItemText(cString title,
|
||||||
char *initialVal,
|
|
||||||
int length,
|
int length,
|
||||||
bool active,
|
bool active,
|
||||||
char *callback) {
|
char *callback) {
|
||||||
selectable = true;
|
selectable = true;
|
||||||
this->title = title;
|
this->title = title;
|
||||||
value = initialVal;
|
value = callback;
|
||||||
this->active = active;
|
this->active = active;
|
||||||
this->callback = callback;
|
this->callback = callback;
|
||||||
height = 3 * font->Height();
|
height = 3 * font->Height();
|
||||||
|
@ -343,7 +343,6 @@ private:
|
|||||||
void DrawValue(char *newValue);
|
void DrawValue(char *newValue);
|
||||||
public:
|
public:
|
||||||
cRecMenuItemText(cString title,
|
cRecMenuItemText(cString title,
|
||||||
char *initialVal,
|
|
||||||
int length,
|
int length,
|
||||||
bool active = false,
|
bool active = false,
|
||||||
char *callback = NULL);
|
char *callback = NULL);
|
||||||
|
@ -611,7 +611,7 @@ cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) {
|
|||||||
infoItem->CalculateHeight(width - 2 * border);
|
infoItem->CalculateHeight(width - 2 * border);
|
||||||
SetHeader(infoItem);
|
SetHeader(infoItem);
|
||||||
strncpy(searchString, event->Title(), TEXTINPUTLENGTH);
|
strncpy(searchString, event->Title(), TEXTINPUTLENGTH);
|
||||||
AddMenuItemInitial(new cRecMenuItemText(tr("Search Expression:"), searchString, TEXTINPUTLENGTH, false));
|
AddMenuItemInitial(new cRecMenuItemText(tr("Search Expression:"), TEXTINPUTLENGTH, false, searchString));
|
||||||
AddMenuItemInitial(new cRecMenuItemButtonYesNo(tr("Continue"), tr("Cancel"), rmsSearchTimerOptions, rmsClose, true));
|
AddMenuItemInitial(new cRecMenuItemButtonYesNo(tr("Continue"), tr("Cancel"), rmsSearchTimerOptions, rmsClose, true));
|
||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
@ -818,7 +818,7 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
|
|||||||
mainMenuItems.clear();
|
mainMenuItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
mainMenuItems.push_back(new cRecMenuItemText(tr("Search term"), searchString, TEXTINPUTLENGTH, init, searchString));
|
mainMenuItems.push_back(new cRecMenuItemText(tr("Search term"), TEXTINPUTLENGTH, init, searchString));
|
||||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), false, &sT.useAsSearchTimer, rmsSearchTimerSave, true));
|
mainMenuItems.push_back(new cRecMenuItemBool(tr("Active"), false, &sT.useAsSearchTimer, rmsSearchTimerSave, true));
|
||||||
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search mode"), searchModes, false, &sT.mode, rmsSearchTimerSave, true));
|
mainMenuItems.push_back(new cRecMenuItemSelect(tr("Search mode"), searchModes, false, &sT.mode, rmsSearchTimerSave, true));
|
||||||
if (sT.mode == 5) {
|
if (sT.mode == 5) {
|
||||||
@ -1196,7 +1196,7 @@ cRecMenuSearch::cRecMenuSearch(std::string searchString, bool withOptions) {
|
|||||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
||||||
infoItem->CalculateHeight(width - 2 * border);
|
infoItem->CalculateHeight(width - 2 * border);
|
||||||
SetHeader(infoItem);
|
SetHeader(infoItem);
|
||||||
AddMenuItem(new cRecMenuItemText(tr("Search Expression:"), this->searchString, TEXTINPUTLENGTH, false, this->searchString));
|
AddMenuItem(new cRecMenuItemText(tr("Search Expression:"), TEXTINPUTLENGTH, false, this->searchString));
|
||||||
if (withOptions) {
|
if (withOptions) {
|
||||||
std::vector<std::string> searchModes;
|
std::vector<std::string> searchModes;
|
||||||
cTVGuideSearchTimer searchTimer;
|
cTVGuideSearchTimer searchTimer;
|
||||||
@ -1339,7 +1339,7 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
|
|||||||
infoItem->CalculateHeight(width - 2 * border);
|
infoItem->CalculateHeight(width - 2 * border);
|
||||||
SetHeader(infoItem);
|
SetHeader(infoItem);
|
||||||
|
|
||||||
AddMenuItem(new cRecMenuItemText(tr("Search Expression:"), searchString, TEXTINPUTLENGTH, false, searchString));
|
AddMenuItem(new cRecMenuItemText(tr("Search Expression:"), TEXTINPUTLENGTH, false, searchString));
|
||||||
AddMenuItem(new cRecMenuItemButtonYesNo(tr("Perform Search"), tr("Cancel"), rmsRecordingSearchResult, rmsClose, true));
|
AddMenuItem(new cRecMenuItemButtonYesNo(tr("Perform Search"), tr("Cancel"), rmsRecordingSearchResult, rmsClose, true));
|
||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
|
Loading…
Reference in New Issue
Block a user