mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Refactor cRecMenuSwitchTimerConfirm
This commit is contained in:
parent
97c8bc23fd
commit
403af35519
16
recmenus.c
16
recmenus.c
@ -1119,18 +1119,14 @@ cSwitchTimer cRecMenuSwitchTimer::GetSwitchTimer(void) {
|
||||
}
|
||||
|
||||
// --- cRecMenuSwitchTimerConfirm ---------------------------------------------------------
|
||||
cRecMenuSwitchTimerConfirm::cRecMenuSwitchTimerConfirm(bool success) {
|
||||
cRecMenuSwitchTimerConfirm::cRecMenuSwitchTimerConfirm(bool success) { // OK
|
||||
SetWidthPercent(50);
|
||||
|
||||
cString message1 = tr("Switch Timer sucessfully created");
|
||||
cString message2 = tr("Switch Timer NOT sucessfully created");
|
||||
cString infoText = success?message1:message2;
|
||||
cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText);
|
||||
infoItem->CalculateHeight(width - 2 * border);
|
||||
AddMenuItem(infoItem);
|
||||
|
||||
AddMenuItem(new cRecMenuItemButton(tr("OK"), rmsClose, true));
|
||||
|
||||
const cString line1 = (success) ? tr("Switch Timer sucessfully created") : tr("Switch Timer NOT sucessfully created");
|
||||
|
||||
AddHeader(new cRecMenuItemInfo(*line1, 1, "", "", "", width - 2 * border));
|
||||
AddFooter(new cRecMenuItemButton(tr("OK"), rmsClose, true));
|
||||
|
||||
CalculateHeight();
|
||||
CreatePixmap();
|
||||
Arrange();
|
||||
|
Loading…
Reference in New Issue
Block a user