mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuConfirmSeriesTimer
This commit is contained in:
parent
2531526a4d
commit
cf9250e50b
21
recmenus.c
21
recmenus.c
@ -574,18 +574,21 @@ void cRecMenuSeriesTimer::CalculateTimes(const cEvent *event) {
|
||||
}
|
||||
|
||||
// --- cRecMenuConfirmSeriesTimer ---------------------------------------------------------
|
||||
cRecMenuConfirmSeriesTimer::cRecMenuConfirmSeriesTimer(cTimer *seriesTimer) {
|
||||
cRecMenuConfirmSeriesTimer::cRecMenuConfirmSeriesTimer(cTimer *seriesTimer) { // OK
|
||||
SetWidthPercent(50);
|
||||
cString message = tr("Series Timer created");
|
||||
cString infoText = message;
|
||||
|
||||
int i = 1;
|
||||
cString line2 = "";
|
||||
const cString line1 = tr("Series Timer created");
|
||||
if (seriesTimer) {
|
||||
cString days = cTimer::PrintDay(seriesTimer->Day(), seriesTimer->WeekDays(), true);
|
||||
infoText = cString::sprintf("%s\n%s, %s: %s, %s: %s", *message, *days, tr("Start"), *TimeString(seriesTimer->StartTime()), tr("Stop"), *TimeString(seriesTimer->StopTime()));
|
||||
const cString days = cTimer::PrintDay(seriesTimer->Day(), seriesTimer->WeekDays(), true);
|
||||
line2 = cString::sprintf("%s, %s: %s, %s: %s", *days, tr("Start"), *TimeString(seriesTimer->StartTime()), tr("Stop"), *TimeString(seriesTimer->StopTime()));
|
||||
i = 2;
|
||||
}
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
AddMenuItem(infoItem);
|
||||
AddMenuItem(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
|
||||
|
||||
AddHeader(new cRecMenuItemInfo(*line1, i, *line2, "", "", width - 2 * border, true));
|
||||
AddFooter(new cRecMenuItemButton(tr("OK"), rmsClose, true, true));
|
||||
|
||||
CalculateHeight();
|
||||
CreatePixmap();
|
||||
Arrange();
|
||||
|
Loading…
Reference in New Issue
Block a user