summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recmenuitem.c3
-rw-r--r--recmenuitem.h1
-rw-r--r--recmenus.c8
3 files changed, 5 insertions, 7 deletions
diff --git a/recmenuitem.c b/recmenuitem.c
index 1cd9fbc..293cd6e 100644
--- a/recmenuitem.c
+++ b/recmenuitem.c
@@ -733,13 +733,12 @@ int cRecMenuItemSelectDirectory::GetInitial(void) {
// --- cRecMenuItemText -------------------------------------------------------
cRecMenuItemText::cRecMenuItemText(cString title,
- char *initialVal,
int length,
bool active,
char *callback) {
selectable = true;
this->title = title;
- value = initialVal;
+ value = callback;
this->active = active;
this->callback = callback;
height = 3 * font->Height();
diff --git a/recmenuitem.h b/recmenuitem.h
index 3bdfb6e..8c88710 100644
--- a/recmenuitem.h
+++ b/recmenuitem.h
@@ -343,7 +343,6 @@ private:
void DrawValue(char *newValue);
public:
cRecMenuItemText(cString title,
- char *initialVal,
int length,
bool active = false,
char *callback = NULL);
diff --git a/recmenus.c b/recmenus.c
index ef4143e..cfe276e 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -611,7 +611,7 @@ cRecMenuSearchTimer::cRecMenuSearchTimer(const cEvent *event) {
infoItem->CalculateHeight(width - 2 * border);
SetHeader(infoItem);
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));
CalculateHeight();
CreatePixmap();
@@ -818,7 +818,7 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
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 cRecMenuItemSelect(tr("Search mode"), searchModes, false, &sT.mode, rmsSearchTimerSave, true));
if (sT.mode == 5) {
@@ -1196,7 +1196,7 @@ cRecMenuSearch::cRecMenuSearch(std::string searchString, bool withOptions) {
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
infoItem->CalculateHeight(width - 2 * border);
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) {
std::vector<std::string> searchModes;
cTVGuideSearchTimer searchTimer;
@@ -1339,7 +1339,7 @@ cRecMenuRecordingSearch::cRecMenuRecordingSearch(std::string search) {
infoItem->CalculateHeight(width - 2 * border);
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));
CalculateHeight();
CreatePixmap();