mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuSearchTimerDeleteConfirm
This commit is contained in:
parent
d24bbefe4c
commit
f900446195
23
recmenus.c
23
recmenus.c
@ -951,26 +951,25 @@ cRecMenuItem *cRecMenuSearchTimerEdit::GetMenuItem(int number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- cRecMenuSearchTimerDeleteConfirm ---------------------------------------------
|
// --- cRecMenuSearchTimerDeleteConfirm ---------------------------------------------
|
||||||
cRecMenuSearchTimerDeleteConfirm::cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer) {
|
cRecMenuSearchTimerDeleteConfirm::cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer) { // OK
|
||||||
this->searchTimer = searchTimer;
|
|
||||||
SetWidthPercent(70);
|
SetWidthPercent(70);
|
||||||
cString message = tr("Really delete Search Timer");
|
|
||||||
cString infoText = cString::sprintf("%s \"%s\"?", *message, searchTimer.GetSearchString().c_str());
|
this->searchTimer = searchTimer;
|
||||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
|
|
||||||
infoItem->CalculateHeight(width - 2 * border);
|
const cString line1 = tr("Really delete Search Timer");
|
||||||
SetHeader(infoItem);
|
const cString line2 = cString::sprintf("\"%s\"?", searchTimer.GetSearchString().c_str());
|
||||||
|
|
||||||
|
AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border, true));
|
||||||
|
AddFooter(new cRecMenuItemButton(tr("Cancel"), rmsClose, false));
|
||||||
|
|
||||||
AddMenuItem(new cRecMenuItemButton(tr("Delete only Search Timer"), rmsSearchTimerDelete, true));
|
AddMenuItem(new cRecMenuItemButton(tr("Delete only Search Timer"), rmsSearchTimerDelete, true));
|
||||||
AddMenuItem(new cRecMenuItemButton(tr("Delete Search Timer and created Timers"), rmsSearchTimerDeleteWithTimers, false));
|
AddMenuItem(new cRecMenuItemButton(tr("Delete Search Timer and created Timers"), rmsSearchTimerDeleteWithTimers, false));
|
||||||
SetFooter(new cRecMenuItemButton(tr("Cancel"), rmsClose, false));
|
|
||||||
CalculateHeight();
|
CalculateHeight();
|
||||||
CreatePixmap();
|
CreatePixmap();
|
||||||
Arrange();
|
Arrange();
|
||||||
}
|
}
|
||||||
|
|
||||||
cRecMenuSearchTimerDeleteConfirm::~cRecMenuSearchTimerDeleteConfirm(void) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
cTVGuideSearchTimer cRecMenuSearchTimerDeleteConfirm::GetSearchTimer(void) {
|
cTVGuideSearchTimer cRecMenuSearchTimerDeleteConfirm::GetSearchTimer(void) {
|
||||||
return searchTimer;
|
return searchTimer;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ private:
|
|||||||
cTVGuideSearchTimer searchTimer;
|
cTVGuideSearchTimer searchTimer;
|
||||||
public:
|
public:
|
||||||
cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer);
|
cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer);
|
||||||
virtual ~cRecMenuSearchTimerDeleteConfirm(void);
|
virtual ~cRecMenuSearchTimerDeleteConfirm(void) {};
|
||||||
cTVGuideSearchTimer GetSearchTimer(void);
|
cTVGuideSearchTimer GetSearchTimer(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user