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

Implemented kNext and kPrev keys

This commit is contained in:
Klaus Schmidinger 2006-04-15 13:46:55 +02:00
parent 12ea50fceb
commit 4611af4339
8 changed files with 78 additions and 8 deletions

View File

@ -1836,3 +1836,6 @@ Peter Dittmann <peter.dittmann@philips.com>
Helge Lenz <h.lenz@gmx.de> Helge Lenz <h.lenz@gmx.de>
for reporting a bug in setting the 'Delta' parameter when calling the shutdown for reporting a bug in setting the 'Delta' parameter when calling the shutdown
script with no active timer script with no active timer
Peter Juszack <vdr@unterbrecher.de>
for a patch that was used as a base to implement kNext and kPrev

View File

@ -4534,4 +4534,5 @@ Video Disk Recorder Revision History
other than /usr/include/linux/dvb, you can define DVBDIR in the Make.config other than /usr/include/linux/dvb, you can define DVBDIR in the Make.config
file (see also INSTALL). Any reference to DVBDIR should be removed from all file (see also INSTALL). Any reference to DVBDIR should be removed from all
plugins' Makefiles. Thanks to Marco Schlüßler for pointing out this problem. plugins' Makefiles. Thanks to Marco Schlüßler for pointing out this problem.
- Implemented kNext and kPrev keys (based on a patch from Peter Juszack).
See MANUAL for details.

3
MANUAL
View File

@ -45,6 +45,9 @@ Version 1.3
FastFwd fast forward FastFwd fast forward
FastRew fast rewind FastRew fast rewind
Next Next/previous channel group (in live tv mode)
Prev or next/previous editing mark (in replay mode)
Channel+ channel up Channel+ channel up
Channel- channel down Channel- channel down

46
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.258 2006/04/15 11:05:27 kls Exp $ * $Id: i18n.c 1.259 2006/04/15 13:39:35 kls Exp $
* *
* Translations provided by: * Translations provided by:
* *
@ -5289,6 +5289,50 @@ const tI18nPhrase Phrases[] = {
"Spol tilbage", "Spol tilbage",
"Dozadu", "Dozadu",
}, },
{ "Key$Next",
"Vorwärts",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "Key$Prev",
"Zurück",
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
"",// TODO
},
{ "Key$Power", { "Key$Power",
"Ausschalten", "Ausschalten",
"Izklop", "Izklop",

4
keys.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: keys.c 1.11 2006/01/16 17:01:25 kls Exp $ * $Id: keys.c 1.12 2006/04/15 13:35:07 kls Exp $
*/ */
#include "keys.h" #include "keys.h"
@ -39,6 +39,8 @@ static tKey keyTable[] = { // "Up" and "Down" must be the first two keys!
{ kRecord, "Record" }, { kRecord, "Record" },
{ kFastFwd, "FastFwd" }, { kFastFwd, "FastFwd" },
{ kFastRew, "FastRew" }, { kFastRew, "FastRew" },
{ kNext, "Next" },
{ kPrev, "Prev" },
{ kPower, "Power" }, { kPower, "Power" },
{ kChanUp, "Channel+" }, { kChanUp, "Channel+" },
{ kChanDn, "Channel-" }, { kChanDn, "Channel-" },

4
keys.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: keys.h 1.7 2006/01/05 15:39:06 kls Exp $ * $Id: keys.h 1.8 2006/04/15 13:34:08 kls Exp $
*/ */
#ifndef __KEYS_H #ifndef __KEYS_H
@ -33,6 +33,8 @@ enum eKeys { // "Up" and "Down" must be the first two keys!
kRecord, kRecord,
kFastFwd, kFastFwd,
kFastRew, kFastRew,
kNext,
kPrev,
kPower, kPower,
kChanUp, kChanUp,
kChanDn, kChanDn,

14
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.430 2006/04/15 10:30:52 kls Exp $ * $Id: menu.c 1.431 2006/04/15 13:37:09 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -3158,6 +3158,10 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
case kLeft: case kLeft:
case kRight|k_Repeat: case kRight|k_Repeat:
case kRight: case kRight:
case kNext|k_Repeat:
case kNext:
case kPrev|k_Repeat:
case kPrev:
withInfo = false; withInfo = false;
number = 0; number = 0;
if (group < 0) { if (group < 0) {
@ -3167,7 +3171,7 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
} }
if (group >= 0) { if (group >= 0) {
int SaveGroup = group; int SaveGroup = group;
if (NORMALKEY(Key) == kRight) if (NORMALKEY(Key) == kRight || NORMALKEY(Key) == kNext)
group = Channels.GetNextGroup(group) ; group = Channels.GetNextGroup(group) ;
else else
group = Channels.GetPrevGroup(group < 1 ? 1 : group); group = Channels.GetPrevGroup(group < 1 ? 1 : group);
@ -3201,6 +3205,8 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
case kDown|k_Release: case kDown|k_Release:
case kChanUp|k_Release: case kChanUp|k_Release:
case kChanDn|k_Release: case kChanDn|k_Release:
case kNext|k_Release:
case kPrev|k_Release:
if (!(Key & k_Repeat) && channel && channel->Number() != cDevice::CurrentChannel()) if (!(Key & k_Repeat) && channel && channel->Number() != cDevice::CurrentChannel())
NewChannel = channel; NewChannel = channel;
withInfo = true; withInfo = true;
@ -4146,8 +4152,12 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
switch (Key) { switch (Key) {
// Editing: // Editing:
case kMarkToggle: MarkToggle(); break; case kMarkToggle: MarkToggle(); break;
case kPrev|k_Repeat:
case kPrev:
case kMarkJumpBack|k_Repeat: case kMarkJumpBack|k_Repeat:
case kMarkJumpBack: MarkJump(false); break; case kMarkJumpBack: MarkJump(false); break;
case kNext|k_Repeat:
case kNext:
case kMarkJumpForward|k_Repeat: case kMarkJumpForward|k_Repeat:
case kMarkJumpForward: MarkJump(true); break; case kMarkJumpForward: MarkJump(true); break;
case kMarkMoveBack|k_Repeat: case kMarkMoveBack|k_Repeat:

9
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/vdr * The project's page is at http://www.cadsoft.de/vdr
* *
* $Id: vdr.c 1.258 2006/04/15 11:29:13 kls Exp $ * $Id: vdr.c 1.259 2006/04/15 13:35:40 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -1061,11 +1061,16 @@ int main(int argc, char *argv[])
} }
// Direct Channel Select: // Direct Channel Select:
case k1 ... k9: case k1 ... k9:
// Left/Right rotates trough channel groups: // Left/Right rotates through channel groups:
case kLeft|k_Repeat: case kLeft|k_Repeat:
case kLeft: case kLeft:
case kRight|k_Repeat: case kRight|k_Repeat:
case kRight: case kRight:
// Previous/Next rotates through channel groups:
case kPrev|k_Repeat:
case kPrev:
case kNext|k_Repeat:
case kNext:
// Up/Down Channel Select: // Up/Down Channel Select:
case kUp|k_Repeat: case kUp|k_Repeat:
case kUp: case kUp: