diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2019-11-09 13:32:08 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2022-06-18 17:03:15 +0200 |
commit | 2531526a4dd15af0cca96bd49150e05a4c3d2287 (patch) | |
tree | 4c18a9e60981b3709184230c92fa40021dc759fd /recmenus.c | |
parent | 37db3b185c199e3eb07c8d3b2f42beea2ab5d2d3 (diff) | |
download | vdr-plugin-tvguide-2531526a4dd15af0cca96bd49150e05a4c3d2287.tar.gz vdr-plugin-tvguide-2531526a4dd15af0cca96bd49150e05a4c3d2287.tar.bz2 |
Refactor cRecMenuSeriesTimer
Diffstat (limited to 'recmenus.c')
-rw-r--r-- | recmenus.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -497,9 +497,12 @@ cTimer *cRecMenuEditTimer::GetTimer(void) { ******************************************************************************************/ // --- cRecMenuSeriesTimer --------------------------------------------------------- -cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder) { +cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const cEvent *event, std::string folder) { // OK if (!initialChannel) return; + + SetWidthPercent(70); + timerActive = true; channel = initialChannel->Number(); dayOfWeek = 127; @@ -508,12 +511,11 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const c CalculateTimes(event); this->folder = folder; - SetWidthPercent(70); - cString title = tr("Create Series Timer based on"); - cString infoText = cString::sprintf("%s:\n%s", *title, event->Title()); - cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true); - infoItem->CalculateHeight(width - 2 * border); - SetHeader(infoItem); + const cString line1 = tr("Create Series Timer based on:"); + const cString line2 = cString::sprintf("\"%s\"", event->Title()); + + AddHeader(new cRecMenuItemInfo(*line1, 2, *line2, "", "", width - 2 * border, true)); + AddFooter(new cRecMenuItemButtonYesNo(tr("Create Timer"), tr("Cancel"), rmsSeriesTimerCreate, rmsClose, true)); AddMenuItem(new cRecMenuItemBool(tr("Timer Active"), false, &timerActive)); AddMenuItem(new cRecMenuItemChannelChooser(tr("Channel"), false, &channel)); @@ -524,8 +526,6 @@ cRecMenuSeriesTimer::cRecMenuSeriesTimer(const cChannel *initialChannel, const c AddMenuItem(new cRecMenuItemInt(tr("Priority"), 0, MAXPRIORITY, false, &priority)); AddMenuItem(new cRecMenuItemInt(tr("Lifetime"), 0, MAXLIFETIME, false, &lifetime)); - AddMenuItem(new cRecMenuItemButtonYesNo(tr("Create Timer"), tr("Cancel"), rmsSeriesTimerCreate, rmsClose, true)); - CalculateHeight(); CreatePixmap(); Arrange(); |