From baf473aedf9289180efa6c28b15be30c831b2f5d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 8 Mar 2012 13:51:00 +0100 Subject: The Green button in the "Edit timer" menu can now be used to toggle between single shot and repeating timers --- menu.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index 9ead8a59..260f9702 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 2.41 2012/03/03 15:00:41 kls Exp $ + * $Id: menu.c 2.42 2012/03/08 13:32:44 kls Exp $ */ #include "menu.h" @@ -903,7 +903,7 @@ cMenuEditTimer::cMenuEditTimer(cTimer *Timer, bool New) :cOsdMenu(tr("Edit timer"), 12) { file = NULL; - firstday = NULL; + day = firstday = NULL; timer = Timer; addIfConfirmed = New; if (timer) { @@ -913,7 +913,7 @@ cMenuEditTimer::cMenuEditTimer(cTimer *Timer, bool New) channel = data.Channel()->Number(); Add(new cMenuEditBitItem( tr("Active"), &data.flags, tfActive)); Add(new cMenuEditChanItem(tr("Channel"), &channel)); - Add(new cMenuEditDateItem(tr("Day"), &data.day, &data.weekdays)); + Add(day = new cMenuEditDateItem(tr("Day"), &data.day, &data.weekdays)); Add(new cMenuEditTimeItem(tr("Start"), &data.start)); Add(new cMenuEditTimeItem(tr("Stop"), &data.stop)); Add(new cMenuEditBitItem( tr("VPS"), &data.flags, tfVps)); @@ -935,7 +935,7 @@ cMenuEditTimer::~cMenuEditTimer() void cMenuEditTimer::SetHelpKeys(void) { - SetHelp(tr("Button$Folder")); + SetHelp(tr("Button$Folder"), data.weekdays ? tr("Button$Once") : tr("Button$Repeating")); } void cMenuEditTimer::SetFirstDayItem(void) @@ -1001,7 +1001,14 @@ eOSState cMenuEditTimer::ProcessKey(eKeys Key) } return osBack; case kRed: return AddSubMenu(new cMenuFolder(tr("Select folder"), &Folders, data.file)); - case kGreen: + case kGreen: if (day) { + day->ToggleRepeating(); + SetCurrent(day); + SetFirstDayItem(); + SetHelpKeys(); + Display(); + } + return osContinue; case kYellow: case kBlue: return osContinue; default: break; -- cgit v1.2.3