summaryrefslogtreecommitdiff
path: root/recmenus.c
diff options
context:
space:
mode:
Diffstat (limited to 'recmenus.c')
-rw-r--r--recmenus.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/recmenus.c b/recmenus.c
index 9e69115..9881e32 100644
--- a/recmenus.c
+++ b/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();