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

Implemented page up/down with 'Left'/'Right'

This commit is contained in:
Klaus Schmidinger 2001-02-03 14:35:28 +01:00
parent b79ccf2292
commit caa96c00ea
6 changed files with 54 additions and 8 deletions

View File

@ -34,6 +34,7 @@ Niels de Carpentier <niels@casema.net>
Martin Hammerschmid <martin@hammerschmid.com> Martin Hammerschmid <martin@hammerschmid.com>
for suggesting to display the direct channel select input on the OSD for suggesting to display the direct channel select input on the OSD
for suggesting to use the "Blue" button in the main menu to resume replay for suggesting to use the "Blue" button in the main menu to resume replay
for implementing pege up/down with the "Left" and "Right" keys
Bastian Guse <bastian@nocopy.de> Bastian Guse <bastian@nocopy.de>
for writing the FORMATS entry for timers.conf for writing the FORMATS entry for timers.conf

View File

@ -350,7 +350,7 @@ Video Disk Recorder Revision History
- Encrypted channels can now be selected even without knowing the PNR (however, it - Encrypted channels can now be selected even without knowing the PNR (however, it
is still necessary for the EPG info). is still necessary for the EPG info).
2001-02-02: Version 0.71 2001-02-03: Version 0.71
- Fixed 'Transfer Mode' in cases where a non-primary interface was switched to - Fixed 'Transfer Mode' in cases where a non-primary interface was switched to
a channel that only the primary interface can receive (which could happen in a channel that only the primary interface can receive (which could happen in
@ -364,3 +364,6 @@ Video Disk Recorder Revision History
exclusively via SVDRP). exclusively via SVDRP).
- The new command line option -D can be used to define which DVB interfaces - The new command line option -D can be used to define which DVB interfaces
a certain instance of VDR shall use. a certain instance of VDR shall use.
- The "Left" and "Right" keys are now used to page up and down in lists (thanks
to Martin Hammerschmid). Since the "Timers" menu already uses these keys to
(de)activate timers, this functionality is not available here.

4
MANUAL
View File

@ -12,8 +12,8 @@ Video Disk Recorder User's Manual
Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Play Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Play
Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause
Left Prev group - - Disable Decrement - Search back Left Prev group - Page up Disable Decrement Page up Search back
Right Next group - - Enable Increment - Search forward Right Next group - Page down Enable Increment Page down Search forward
Ok Ch display Select Switch Edit Accept Play Progress disp. Ok Ch display Select Switch Edit Accept Play Progress disp.
Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on
Back - Menu off Main menu Main menu Discard Main menu Recordings menu Back - Menu off Main menu Main menu Discard Main menu Recordings menu

12
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.58 2001/01/13 13:07:43 kls Exp $ * $Id: menu.c 1.59 2001/02/03 14:28:42 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -1074,12 +1074,18 @@ eOSState cMenuTimers::Summary(void)
eOSState cMenuTimers::ProcessKey(eKeys Key) eOSState cMenuTimers::ProcessKey(eKeys Key)
{ {
// Must do these before calling cOsdMenu::ProcessKey() because cOsdMenu
// uses them to page up/down:
switch (Key) {
case kLeft:
case kRight: return Activate(Key == kRight);
default: break;
}
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (state == osUnknown) { if (state == osUnknown) {
switch (Key) { switch (Key) {
case kLeft:
case kRight: return Activate(Key == kRight);
case kOk: return Summary(); case kOk: return Summary();
case kRed: return Edit(); case kRed: return Edit();
case kGreen: return New(); case kGreen: return New();

36
osd.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: osd.c 1.13 2000/11/12 15:29:25 kls Exp $ * $Id: osd.c 1.14 2001/02/03 14:26:18 kls Exp $
*/ */
#include "osd.h" #include "osd.h"
@ -252,6 +252,36 @@ void cOsdMenu::CursorDown(void)
} }
} }
void cOsdMenu::PageUp(void)
{
if (Count() <= MAXOSDITEMS)
return;
int relpos = current - first;
current -= MAXOSDITEMS;
first -= MAXOSDITEMS;
if (first < 0) {
first = Count() - MAXOSDITEMS;
current = first + relpos;
}
Display();
DisplayCurrent(true);
}
void cOsdMenu::PageDown(void)
{
if (Count() <= MAXOSDITEMS)
return;
int relpos = current - first;
current += MAXOSDITEMS;
first += MAXOSDITEMS;
if (current > Count() - 1) {
first = 0;
current = first + relpos;
}
Display();
DisplayCurrent(true);
}
void cOsdMenu::Mark(void) void cOsdMenu::Mark(void)
{ {
if (Count() && marked < 0) { if (Count() && marked < 0) {
@ -293,6 +323,10 @@ eOSState cOsdMenu::ProcessKey(eKeys Key)
case kUp: CursorUp(); break; case kUp: CursorUp(); break;
case kDown|k_Repeat: case kDown|k_Repeat:
case kDown: CursorDown(); break; case kDown: CursorDown(); break;
case kLeft|k_Repeat:
case kLeft: PageUp(); break;
case kRight|k_Repeat:
case kRight: PageDown(); break;
case kBack: return osBack; case kBack: return osBack;
case kOk: if (marked >= 0) { case kOk: if (marked >= 0) {
SetStatus(NULL); SetStatus(NULL);

4
osd.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: osd.h 1.18 2000/12/24 10:16:52 kls Exp $ * $Id: osd.h 1.19 2001/02/03 14:14:23 kls Exp $
*/ */
#ifndef __OSD_H #ifndef __OSD_H
@ -85,6 +85,8 @@ protected:
void DisplayCurrent(bool Current); void DisplayCurrent(bool Current);
void CursorUp(void); void CursorUp(void);
void CursorDown(void); void CursorDown(void);
void PageUp(void);
void PageDown(void);
void Mark(void); void Mark(void);
eOSState AddSubMenu(cOsdMenu *SubMenu); eOSState AddSubMenu(cOsdMenu *SubMenu);
bool HasSubMenu(void) { return subMenu; } bool HasSubMenu(void) { return subMenu; }