From 7e4662f98233f1262946fb3b9b3dd2681cae1562 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 5 Feb 2006 14:38:56 +0100 Subject: Fixed scrolling with Up/Down in case there are non-selectable items at the beginning or end of the menu --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ osdbase.c | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d90fae61..64367953 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -550,6 +550,8 @@ Helmut Auer for suggesting to give a message when an instant recording is started fpr suggesting to retry a shutdown after a while for separating the 'install' target into several individual targets + for reporting a problem with scrolling with Up/Down in case there are non-selectable + items at the beginning of the menu Jeremy Hall for fixing an incomplete initialization of the filter parameters in eit.c diff --git a/HISTORY b/HISTORY index e9c116eb..c6ed8ef7 100644 --- a/HISTORY +++ b/HISTORY @@ -4312,3 +4312,5 @@ Video Disk Recorder Revision History - Renamed the Makefile target 'plugins-clean' to 'clean-plugins' (suggested by Sebastian Frei). - Made all font and image data 'const' (thanks to Darren Salt). +- Fixed scrolling with Up/Down in case there are non-selectable items at the + beginning or end of the menu (reported by Helmut Auer). diff --git a/osdbase.c b/osdbase.c index d81c33b9..65b66cb8 100644 --- a/osdbase.c +++ b/osdbase.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.c 1.28 2006/01/08 11:40:02 kls Exp $ + * $Id: osdbase.c 1.29 2006/02/05 14:37:03 kls Exp $ */ #include "osdbase.h" @@ -280,6 +280,12 @@ void cOsdMenu::CursorUp(void) return; while (--tmpCurrent != current) { if (tmpCurrent < 0) { + if (first > 0) { + // make non-selectable items at the beginning visible: + first = 0; + Display(); + return; + } if (Setup.MenuScrollWrap) tmpCurrent = last + 1; else @@ -312,6 +318,12 @@ void cOsdMenu::CursorDown(void) return; while (++tmpCurrent != current) { if (tmpCurrent > last) { + if (first < last - displayMenuItems) { + // make non-selectable items at the end visible: + first = last - displayMenuItems + 1; + Display(); + return; + } if (Setup.MenuScrollWrap) tmpCurrent = -1; else -- cgit v1.2.3