1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

In the "Timers" menu the blue key is now "Info" and the red key is "On/Off"

This commit is contained in:
Klaus Schmidinger 2006-02-25 14:39:29 +01:00
parent 9dc73da7f5
commit c631893066
5 changed files with 78 additions and 18 deletions

View File

@ -4392,3 +4392,6 @@ Video Disk Recorder Revision History
the EPG event used when creating it. the EPG event used when creating it.
- The option "Setup/OSD/Sort timers" has been removed. Timers are always sorted - The option "Setup/OSD/Sort timers" has been removed. Timers are always sorted
by their start time and priority. by their start time and priority.
- The "Blue" key in the "Timers" menu now displays the EPG info of the event the
selected timer will record (if available). The "On/Off" function has been shifted
to the "Red" button. Editing a timer is done by pressing "Ok".

10
MANUAL
View File

@ -20,10 +20,10 @@ Version 1.3
Ok Ch display Select Switch Edit Accept Play Progress disp. Switch & Close Ok Ch display Select Switch Edit Accept Play Progress disp. Switch & Close
Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu off Menu off Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu off Menu off
Back - Menu off VDR menu VDR menu Discard VDR menu Recordings menu Close Back - Menu off VDR menu VDR menu Discard VDR menu Recordings menu Close
Red - Record Edit Edit ABC/abc Play/Commands(1) Jump - Red - Record Edit On/Off ABC/abc Play/Commands(1) Jump -
Green - Audio New New Ins/Ovr Rewind Skip -60s - Green - Audio New New Ins/Ovr Rewind Skip -60s -
Yellow - Pause live Delete Delete Delete Delete Skip +60s - Yellow - Pause live Delete Delete Delete Delete Skip +60s -
Blue - Stop/Resume Mark On/Off - Info Stop - Blue - Stop/Resume Mark Info - Info Stop -
0..9 Ch select - Sort(2) Day(3) Numeric inp. Exec cmd(1) Editing - 0..9 Ch select - Sort(2) Day(3) Numeric inp. Exec cmd(1) Editing -
In a numerical input field (like the response to a CAM enquiry) the keys 0..9 In a numerical input field (like the response to a CAM enquiry) the keys 0..9
@ -98,12 +98,10 @@ Version 1.3
any changes that might have been made in the current menu. any changes that might have been made in the current menu.
In the "Timers" menu, the current timer can be enabled or disabled with In the "Timers" menu, the current timer can be enabled or disabled with
the "Blue" key (this is only possible if the "Timers" list is sorted, the "Red" key. Enabled timers are marked with '>', timers
otherwise the "Blue" key is used to mark a timer in order to move it to
another position in the list). Enabled timers are marked with '>', timers
that are currently recording are marked with '#'. If a timer has the that are currently recording are marked with '#'. If a timer has the
"First day" set so that it will start recording only on the given date, "First day" set so that it will start recording only on the given date,
it is marked with '!'. The "Blue" key toggles through the "enabled" and it is marked with '!'. The "Red" key toggles through the "enabled" and
"disabled" states, and for repeating timers that are currently recording "disabled" states, and for repeating timers that are currently recording
also a state that ends this recording prematurely and sets the "First day" also a state that ends this recording prematurely and sets the "First day"
date so that it will record again the next time the timer hits. date so that it will record again the next time the timer hits.

24
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: i18n.c 1.249 2006/02/25 14:13:41 kls Exp $ * $Id: i18n.c 1.250 2006/02/25 14:21:28 kls Exp $
* *
* Translations provided by: * Translations provided by:
* *
@ -724,6 +724,28 @@ const tI18nPhrase Phrases[] = {
"Optag", "Optag",
"Nahrát", "Nahrát",
}, },
{ "Button$Info",
"Info",
"Info",
"",//TODO
"Info",
"",//TODO
"Info",
"",//TODO
"Tiedot",
"Info",
"Info",
"Ðëçñïöïñßåò",
"Info",
"Info",
"",//TODO
"",//TODO
"¸ÝäÞ",
"Info",
"Info",
"Info",
"Info",
},
{ "Button$Play", { "Button$Play",
"Wiedergabe", "Wiedergabe",
"Predvajaj", "Predvajaj",

53
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.419 2006/02/25 14:13:29 kls Exp $ * $Id: menu.c 1.420 2006/02/25 14:39:29 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -768,12 +768,15 @@ void cMenuTimerItem::Set(void)
class cMenuTimers : public cOsdMenu { class cMenuTimers : public cOsdMenu {
private: private:
int helpKeys;
eOSState Edit(void); eOSState Edit(void);
eOSState New(void); eOSState New(void);
eOSState Delete(void); eOSState Delete(void);
eOSState OnOff(void); eOSState OnOff(void);
virtual void Move(int From, int To); virtual void Move(int From, int To);
eOSState Info(void);
cTimer *CurrentTimer(void); cTimer *CurrentTimer(void);
void SetHelpKeys(void);
public: public:
cMenuTimers(void); cMenuTimers(void);
virtual ~cMenuTimers(); virtual ~cMenuTimers();
@ -783,10 +786,12 @@ public:
cMenuTimers::cMenuTimers(void) cMenuTimers::cMenuTimers(void)
:cOsdMenu(tr("Timers"), 2, CHNUMWIDTH, 10, 6, 6) :cOsdMenu(tr("Timers"), 2, CHNUMWIDTH, 10, 6, 6)
{ {
helpKeys = -1;
for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer))
Add(new cMenuTimerItem(timer)); Add(new cMenuTimerItem(timer));
Sort(); Sort();
SetHelp(tr("Button$Edit"), tr("Button$New"), tr("Button$Delete"), tr("Button$On/Off")); SetCurrent(First());
SetHelpKeys();
Timers.IncBeingEdited(); Timers.IncBeingEdited();
} }
@ -801,8 +806,26 @@ cTimer *cMenuTimers::CurrentTimer(void)
return item ? item->Timer() : NULL; return item ? item->Timer() : NULL;
} }
void cMenuTimers::SetHelpKeys(void)
{
int NewHelpKeys = 0;
cTimer *timer = CurrentTimer();
if (timer) {
if (timer->Event())
NewHelpKeys = 2;
else
NewHelpKeys = 1;
}
if (NewHelpKeys != helpKeys) {
helpKeys = NewHelpKeys;
SetHelp(helpKeys > 0 ? tr("Button$On/Off") : NULL, tr("Button$New"), helpKeys > 0 ? tr("Button$Delete") : NULL, helpKeys == 2 ? tr("Button$Info") : NULL);
}
}
eOSState cMenuTimers::OnOff(void) eOSState cMenuTimers::OnOff(void)
{ {
if (HasSubMenu())
return osContinue;
cTimer *timer = CurrentTimer(); cTimer *timer = CurrentTimer();
if (timer) { if (timer) {
timer->OnOff(); timer->OnOff();
@ -865,6 +888,16 @@ void cMenuTimers::Move(int From, int To)
isyslog("timer %d moved to %d", From + 1, To + 1); isyslog("timer %d moved to %d", From + 1, To + 1);
} }
eOSState cMenuTimers::Info(void)
{
if (HasSubMenu() || Count() == 0)
return osContinue;
cTimer *ti = CurrentTimer();
if (ti && ti->Event())
return AddSubMenu(new cMenuEvent(ti->Event()));
return osContinue;
}
eOSState cMenuTimers::ProcessKey(eKeys Key) eOSState cMenuTimers::ProcessKey(eKeys Key)
{ {
int TimerNumber = HasSubMenu() ? Count() : -1; int TimerNumber = HasSubMenu() ? Count() : -1;
@ -873,10 +906,11 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
if (state == osUnknown) { if (state == osUnknown) {
switch (Key) { switch (Key) {
case kOk: return Edit(); case kOk: return Edit();
case kRed: return Edit();//XXX case kRed: return OnOff();
case kGreen: return New(); case kGreen: return New();
case kYellow: return Delete(); case kYellow: return Delete();
case kBlue: return OnOff(); case kBlue: return Info();
break;
default: break; default: break;
} }
} }
@ -885,12 +919,14 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
Add(new cMenuTimerItem(Timers.Get(TimerNumber)), true); Add(new cMenuTimerItem(Timers.Get(TimerNumber)), true);
Display(); Display();
} }
if (Key != kNone)
SetHelpKeys();
return state; return state;
} }
// --- cMenuEvent ------------------------------------------------------------ // --- cMenuEvent ------------------------------------------------------------
cMenuEvent::cMenuEvent(const cEvent *Event, bool CanSwitch) cMenuEvent::cMenuEvent(const cEvent *Event, bool CanSwitch, bool Buttons)
:cOsdMenu(tr("Event")) :cOsdMenu(tr("Event"))
{ {
event = Event; event = Event;
@ -900,6 +936,7 @@ cMenuEvent::cMenuEvent(const cEvent *Event, bool CanSwitch)
SetTitle(channel->Name()); SetTitle(channel->Name());
int TimerMatch = tmNone; int TimerMatch = tmNone;
Timers.GetMatch(event, &TimerMatch); Timers.GetMatch(event, &TimerMatch);
if (Buttons)
SetHelp(TimerMatch == tmFull ? tr("Button$Timer") : tr("Button$Record"), NULL, NULL, CanSwitch ? tr("Button$Switch") : NULL); SetHelp(TimerMatch == tmFull ? tr("Button$Timer") : tr("Button$Record"), NULL, NULL, CanSwitch ? tr("Button$Switch") : NULL);
} }
} }
@ -1154,7 +1191,7 @@ eOSState cMenuWhatsOn::ProcessKey(eKeys Key)
break; break;
case kBlue: return Switch(); case kBlue: return Switch();
case kOk: if (Count()) case kOk: if (Count())
return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true)); return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true, true));
break; break;
default: break; default: break;
} }
@ -1423,7 +1460,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
return Switch(); return Switch();
break; break;
case kOk: if (Count()) case kOk: if (Count())
return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, otherChannel)); return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, otherChannel, true));
break; break;
default: break; default: break;
} }
@ -1831,7 +1868,7 @@ void cMenuRecordings::SetHelpKeys(void)
case 0: SetHelp(NULL); break; case 0: SetHelp(NULL); break;
case 1: SetHelp(tr("Button$Open")); break; case 1: SetHelp(tr("Button$Open")); break;
case 2: case 2:
case 3: SetHelp(RecordingCommands.Count() ? tr("Commands") : tr("Button$Play"), tr("Button$Rewind"), tr("Button$Delete"), NewHelpKeys == 3 ? tr("Info") : NULL); case 3: SetHelp(RecordingCommands.Count() ? tr("Commands") : tr("Button$Play"), tr("Button$Rewind"), tr("Button$Delete"), NewHelpKeys == 3 ? tr("Button$Info") : NULL);
} }
helpKeys = NewHelpKeys; helpKeys = NewHelpKeys;
} }

4
menu.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.h 1.83 2006/02/17 15:38:40 kls Exp $ * $Id: menu.h 1.84 2006/02/25 14:39:29 kls Exp $
*/ */
#ifndef __MENU_H #ifndef __MENU_H
@ -49,7 +49,7 @@ class cMenuEvent : public cOsdMenu {
private: private:
const cEvent *event; const cEvent *event;
public: public:
cMenuEvent(const cEvent *Event, bool CanSwitch = false); cMenuEvent(const cEvent *Event, bool CanSwitch = false, bool Buttons = false);
virtual void Display(void); virtual void Display(void);
virtual eOSState ProcessKey(eKeys Key); virtual eOSState ProcessKey(eKeys Key);
}; };