1 diff -Nru vdr-1.6.0/config.c vdr-1.6.0-patched/config.c
2 --- vdr-1.6.0/config.c 2008-02-17 14:39:00.000000000 +0100
3 +++ vdr-1.6.0-patched/config.c 2008-04-29 22:55:41.000000000 +0200
7 cCommands RecordingCommands;
8 +cCommands TimerCommands;
10 // --- cSVDRPhosts -----------------------------------------------------------
12 diff -Nru vdr-1.6.0/config.h vdr-1.6.0-patched/config.h
13 --- vdr-1.6.0/config.h 2008-03-23 11:26:10.000000000 +0100
14 +++ vdr-1.6.0-patched/config.h 2008-04-29 22:55:41.000000000 +0200
17 extern cCommands Commands;
18 extern cCommands RecordingCommands;
19 +extern cCommands TimerCommands;
20 extern cSVDRPhosts SVDRPhosts;
22 class cSetupLine : public cListObject {
23 diff -Nru vdr-1.6.0/menu.c vdr-1.6.0-patched/menu.c
24 --- vdr-1.6.0/menu.c 2008-03-16 12:15:28.000000000 +0100
25 +++ vdr-1.6.0-patched/menu.c 2008-04-29 22:55:41.000000000 +0200
30 -// --- cMenuTimerItem --------------------------------------------------------
31 +// --- cMenuCommands ---------------------------------------------------------
32 +// declaration shifted so it can be used in cMenuTimers
33 +class cMenuCommands : public cOsdMenu {
35 + cCommands *commands;
37 + eOSState Execute(void);
39 + cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
40 + virtual ~cMenuCommands();
41 + virtual eOSState ProcessKey(eKeys Key);
44 +// --- cMenuTimerItem --------------------------------------------------------
45 class cMenuTimerItem : public cOsdItem {
51 cTimer *CurrentTimer(void);
52 + eOSState Commands(eKeys Key = kNone);
53 void SetHelpKeys(void);
60 +#define CHECK_2PTR_NULL(x_,y_) ((x_)? ((y_)? y_:""):"")
62 +eOSState cMenuTimers::Commands(eKeys Key)
64 + if (HasSubMenu() || Count() == 0)
66 + cTimer *ti = CurrentTimer();
68 + char *parameter = NULL;
69 + const cEvent *pEvent = ti->Event();
74 + pEvent = ti->Event();
77 +// create a dummy recording to get the real filename
78 + cRecording *rc_dummy = new cRecording(ti, pEvent);
80 + cRecording *rc = Recordings.GetByName(rc_dummy->FileName());
84 + iRecNumber=rc->Index() + 1;
86 +//Parameter format TimerNumber 'ChannelId' Start Stop 'Titel' 'Subtitel' 'file' RecNumer
88 + asprintf(¶meter, "%d '%s' %d %d '%s' '%s' '%s' %d", ti->Index(),
89 + *ti->Channel()->GetChannelID().ToString(),
90 + (int)ti->StartTime(),
91 + (int)ti->StopTime(),
92 + CHECK_2PTR_NULL(pEvent, pEvent->Title()),
93 + CHECK_2PTR_NULL(pEvent, pEvent->ShortText()),
96 + isyslog("timercmd: %s", parameter);
97 + cMenuCommands *menu;
98 + eOSState state = AddSubMenu(menu = new cMenuCommands(tr("Timer commands"), &TimerCommands, parameter));
101 + state = menu->ProcessKey(Key);
107 eOSState cMenuTimers::ProcessKey(eKeys Key)
109 int TimerNumber = HasSubMenu() ? Count() : -1;
112 case kBlue: return Info();
114 + case k1...k9: return Commands(Key);
115 + case k0: return (TimerCommands.Count()? Commands():osContinue);
119 @@ -1548,17 +1610,6 @@
121 // --- cMenuCommands ---------------------------------------------------------
123 -class cMenuCommands : public cOsdMenu {
125 - cCommands *commands;
127 - eOSState Execute(void);
129 - cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
130 - virtual ~cMenuCommands();
131 - virtual eOSState ProcessKey(eKeys Key);
134 cMenuCommands::cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters)
137 diff -Nru vdr-1.6.0/po/de_DE.po vdr-1.6.0-patched/po/de_DE.po
138 --- vdr-1.6.0/po/de_DE.po 2008-03-23 11:31:29.000000000 +0100
139 +++ vdr-1.6.0-patched/po/de_DE.po 2008-04-29 22:55:41.000000000 +0200
141 msgid "Timer still recording - really delete?"
142 msgstr "Timer zeichnet auf - trotzdem löschen?"
144 +msgid "Timer commands"
145 +msgstr "Befehle für Timer"
150 diff -Nru vdr-1.6.0/vdr.c vdr-1.6.0-patched/vdr.c
151 --- vdr-1.6.0/vdr.c 2008-03-14 14:22:39.000000000 +0100
152 +++ vdr-1.6.0-patched/vdr.c 2008-04-29 22:55:41.000000000 +0200
154 Timers.Load(AddDirectory(ConfigDirectory, "timers.conf")) &&
155 Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true) &&
156 RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true) &&
157 + TimerCommands.Load(AddDirectory(ConfigDirectory, "timercmds.conf"), true) &&
158 SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true) &&
159 Keys.Load(AddDirectory(ConfigDirectory, "remote.conf")) &&
160 KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true)