summaryrefslogtreecommitdiff
path: root/recmenus.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-11-09 14:11:01 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-18 17:03:15 +0200
commitf900446195b2955cc10c05812af07f6227b72bcc (patch)
tree52a99afef8f08a7664032ff0e662d694a6bdbcfb /recmenus.c
parentd24bbefe4cc3bf8e2fc9f2c78203b175fac3ef4d (diff)
downloadvdr-plugin-tvguide-f900446195b2955cc10c05812af07f6227b72bcc.tar.gz
vdr-plugin-tvguide-f900446195b2955cc10c05812af07f6227b72bcc.tar.bz2
Refactor cRecMenuSearchTimerDeleteConfirm
Diffstat (limited to 'recmenus.c')
-rw-r--r--recmenus.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/recmenus.c b/recmenus.c
index 6c314f0..24ce694 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -951,26 +951,25 @@ cRecMenuItem *cRecMenuSearchTimerEdit::GetMenuItem(int number) {
}
// --- cRecMenuSearchTimerDeleteConfirm ---------------------------------------------
-cRecMenuSearchTimerDeleteConfirm::cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer) {
- this->searchTimer = searchTimer;
+cRecMenuSearchTimerDeleteConfirm::cRecMenuSearchTimerDeleteConfirm(cTVGuideSearchTimer searchTimer) { // OK
SetWidthPercent(70);
- cString message = tr("Really delete Search Timer");
- cString infoText = cString::sprintf("%s \"%s\"?", *message, searchTimer.GetSearchString().c_str());
- cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
- infoItem->CalculateHeight(width - 2 * border);
- SetHeader(infoItem);
+
+ this->searchTimer = searchTimer;
+
+ const cString line1 = tr("Really delete Search Timer");
+ 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 Search Timer and created Timers"), rmsSearchTimerDeleteWithTimers, false));
- SetFooter(new cRecMenuItemButton(tr("Cancel"), rmsClose, false));
+
CalculateHeight();
CreatePixmap();
Arrange();
}
-cRecMenuSearchTimerDeleteConfirm::~cRecMenuSearchTimerDeleteConfirm(void) {
-
-}
-
cTVGuideSearchTimer cRecMenuSearchTimerDeleteConfirm::GetSearchTimer(void) {
return searchTimer;
}