From 1838c02c9e02b2f3a9a5a8f86b89e0700e4225cf Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 24 Mar 2002 11:23:23 +0100 Subject: [PATCH] Fixed scrolling the 'Channels' menu in case the cursor ends up on a group delimiter --- CONTRIBUTORS | 4 ++++ HISTORY | 4 +++- osd.c | 10 +++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 70dd219e..7f0b54ef 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -233,3 +233,7 @@ Mirko G Achim Lange for replacing 'killproc' with 'killall' in 'runvdr' to make it work on Debian + +Bernd Zierath + for helping to debug scrolling the "Channels" menu in case the cursor ends up on + a group separator diff --git a/HISTORY b/HISTORY index aa07988d..d47ff346 100644 --- a/HISTORY +++ b/HISTORY @@ -1120,7 +1120,7 @@ Video Disk Recorder Revision History exits. The 'runvdr' script can be used for this purpose. - Refined texts of the "Setup" menu. -2002-03-22: Version 1.0.0pre5 +2002-03-24: Version 1.0.0pre5 - Fixed restoring CICAM setup values for a fourth DVB card. - Completed internationalization of OSD texts (thanks to Hannu Savolainen, @@ -1135,3 +1135,5 @@ Video Disk Recorder Revision History is now immediately shown in the status line (followed by "...") to give the user some feedback that the command is being executed, which is especially important if this takes some time. +- Fixed scrolling the "Channels" menu in case the cursor ends up on a group + delimiter (thanks to Bernd Zierath for helping to debug this one). diff --git a/osd.c b/osd.c index e404a6f8..0b445780 100644 --- a/osd.c +++ b/osd.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.21 2002/03/10 16:18:06 kls Exp $ + * $Id: osd.c 1.22 2002/03/24 11:23:23 kls Exp $ */ #include "osd.h" @@ -288,6 +288,10 @@ void cOsdMenu::PageUp(void) first -= MAXOSDITEMS; if (first < 0) first = current = 0; + if (SpecialItem(current)) { + current -= (current > 0) ? 1 : -1; + first = min(first, current - 1); + } Display(); DisplayCurrent(true); } @@ -302,6 +306,10 @@ void cOsdMenu::PageDown(void) current = Count() - 1; first = Count() - MAXOSDITEMS; } + if (SpecialItem(current)) { + current += (current < Count() - 1) ? 1 : -1; + first = max(first, current - MAXOSDITEMS); + } Display(); DisplayCurrent(true); }