mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuSearchTimerTemplatesCreate
This commit is contained in:
parent
7f7a16498c
commit
4f95cffdb2
24
recmenus.c
24
recmenus.c
@ -998,23 +998,21 @@ 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");
|
||||
|
||||
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);
|
||||
this->templ = templ;
|
||||
this->searchTimer = searchTimer;
|
||||
|
||||
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();
|
||||
Arrange();
|
||||
|
Loading…
Reference in New Issue
Block a user