diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-11-09 14:11:01 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-18 17:03:15 +0200 |
commit | f900446195b2955cc10c05812af07f6227b72bcc (patch) | |
tree | 52a99afef8f08a7664032ff0e662d694a6bdbcfb /recmenus.c | |
parent | d24bbefe4cc3bf8e2fc9f2c78203b175fac3ef4d (diff) | |
download | vdr-plugin-tvguide-f900446195b2955cc10c05812af07f6227b72bcc.tar.gz vdr-plugin-tvguide-f900446195b2955cc10c05812af07f6227b72bcc.tar.bz2 |
Refactor cRecMenuSearchTimerDeleteConfirm
Diffstat (limited to 'recmenus.c')
-rw-r--r-- | recmenus.c | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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; } |