summaryrefslogtreecommitdiff
path: root/recmenus.c
diff options
context:
space:
mode:
Diffstat (limited to 'recmenus.c')
-rw-r--r--recmenus.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/recmenus.c b/recmenus.c
index 35aed8f..9e69115 100644
--- a/recmenus.c
+++ b/recmenus.c
@@ -1089,26 +1089,23 @@ cRecMenuSearchTimerNothingFound::cRecMenuSearchTimerNothingFound(std::string sea
******************************************************************************************/
// --- cRecMenuSwitchTimer ---------------------------------------------------------
-cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) {
+cRecMenuSwitchTimer::cRecMenuSwitchTimer(void) { // OK
+ SetWidthPercent(60);
+
switchMinsBefore = config.switchMinsBefore;
switchMode = config.switchMode;
- SetWidthPercent(60);
-
- cString infoText = tr("Configure Options for Switchtimer");
- cRecMenuItemInfo *infoItem = new cRecMenuItemInfo(*infoText, true);
- infoItem->CalculateHeight(width - 2 * border);
- AddMenuItem(infoItem);
+ AddHeader(new cRecMenuItemInfo(tr("Configure Options for Switchtimer"), 1, "", "", "", width - 2 * border, true));
+ AddFooter(new cRecMenuItemButtonYesNo(tr("Create"), tr("Cancel"), rmsSwitchTimerCreate, rmsClose, true));
- AddMenuItem(new cRecMenuItemInt(tr("Minutes before switching"), 0, 10, false, &switchMinsBefore));
std::vector<std::string> switchModeItems;
switchModeItems.push_back(tr("switch"));
switchModeItems.push_back(tr("announce only"));
switchModeItems.push_back(tr("ask for switch"));
+
+ AddMenuItem(new cRecMenuItemInt(tr("Minutes before switching"), 0, 10, false, &switchMinsBefore));
AddMenuItem(new cRecMenuItemSelect(tr("Switch Mode"), switchModeItems, false, &switchMode));
-
- AddMenuItem(new cRecMenuItemButtonYesNo(tr("Create"), tr("Cancel"), rmsSwitchTimerCreate, rmsClose, true));
-
+
CalculateHeight();
CreatePixmap();
Arrange();