Refactor cRecMenuSearchTimerTemplatesCreate

This commit is contained in:
kamel5 2019-11-09 14:32:26 +01:00
parent 7f7a16498c
commit 4f95cffdb2

View File

@ -998,22 +998,20 @@ cRecMenuSearchTimerCreateConfirm::cRecMenuSearchTimerCreateConfirm(bool success)
}
// --- cRecMenuSearchTimerTemplatesCreate ---------------------------------------------------------
cRecMenuSearchTimerTemplatesCreate::cRecMenuSearchTimerTemplatesCreate(TVGuideEPGSearchTemplate templ, cTVGuideSearchTimer searchTimer) {
this->templ = templ;
this->searchTimer = searchTimer;
cRecMenuSearchTimerTemplatesCreate::cRecMenuSearchTimerTemplatesCreate(TVGuideEPGSearchTemplate templ, cTVGuideSearchTimer searchTimer) { // OK
SetWidthPercent(70);
cString message1 = tr("Creating Search Timer");
cString message2 = tr("Search Term");
cString message3 = tr("Using Template");
this->templ = templ;
this->searchTimer = searchTimer;
cString infoText = cString::sprintf("%s\n%s: \"%s\"\n%s \"%s\"", *message1, *message2, searchTimer.GetSearchString().c_str(), *message3, templ.name.c_str());
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
infoItem->CalculateHeight(width - 2 * border);
AddMenuItem(infoItem);
const cString line1 = tr("Creating Search Timer");
const cString line2 = cString::sprintf("%s: \"%s\"", tr("Search Term"), searchTimer.GetSearchString().c_str());
const cString line3 = cString::sprintf("%s \"%s\"", tr("Using Template"), templ.name.c_str());
AddHeader(new cRecMenuItemInfo(*line1, 3, *line2, *line3, "", width - 2 * border));
AddFooter(new cRecMenuItemButtonYesNo(tr("Create Search Timer"), tr("Use other Template"), rmsSearchTimerSave, rmsSearchTimerOptions, false));
AddMenuItem(new cRecMenuItemButton(tr("Display Results for Search Timer"), rmsSearchTimerTest, true));
AddMenuItem(new cRecMenuItemButtonYesNo(tr("Create Search Timer"), tr("Use other Template"), rmsSearchTimerSave, rmsSearchTimerOptions, false));
CalculateHeight();
CreatePixmap();