summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--MANUAL10
-rw-r--r--osdbase.c20
4 files changed, 13 insertions, 19 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 0bb913f0..38488403 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1297,6 +1297,7 @@ Laurence Abbott <laz@club-burniston.co.uk>
Patrick Gleichmann <patrick@feedface.com>
for fixing the default quality value when grabbing a JPEG image
+ for suggestiong a modified page scrolling behaviour
Achim Tuffentsammer <a.tuffentsammer@web.de>
for reporting a crash in case a plugin needs to issue an error message before the
diff --git a/HISTORY b/HISTORY
index 4b4693de..5ddc6a73 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3617,3 +3617,4 @@ Video Disk Recorder Revision History
- Fixed handling 'page down', which was broken in version 1.3.26 (thanks to Udo
Richter).
+- Modified page scrolling behaviour (based on a suggestion by Patrick Gleichmann).
diff --git a/MANUAL b/MANUAL
index 8a65809e..d2bb8e4e 100644
--- a/MANUAL
+++ b/MANUAL
@@ -495,11 +495,11 @@ Version 1.2
Scroll pages = yes no = when pressing the "Down" ("Up") key while the cursor
is on the last (first) line of a list page, the
- list is advanced by a full page and the cursor will
- be at the top (bottom) of that page
- yes = dto., but the cursor remains at the bottom (top) of
- the page (this mode allows for faster scrolling
- through long lists).
+ list is scrolled down (up) a single line and the cursor will
+ remain at the bottom (top) of that page
+ yes = the list is scrolled down (up) a full page and the cursor
+ will be at the top (bottom) of that page (this mode allows
+ for faster scrolling through long lists).
Sort timers = yes Turns sorting the timers in the "Timers" menu on/off.
Timers are sorted by ascending start times, with the
diff --git a/osdbase.c b/osdbase.c
index b27b1df2..711bd4cd 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.18 2005/06/17 14:22:34 kls Exp $
+ * $Id: osdbase.c 1.19 2005/06/17 15:35:27 kls Exp $
*/
#include "osdbase.h"
@@ -271,9 +271,7 @@ void cOsdMenu::CursorUp(void)
DisplayCurrent(false);
current = tmpCurrent;
if (current < first) {
- first = first > displayMenuItems - 1 ? first - (displayMenuItems - 1) : 0;
- if (Setup.MenuScrollPage)
- current = !SelectableItem(first) ? first + 1 : first;
+ first = Setup.MenuScrollPage ? max(0, current - displayMenuItems + 1) : current;
Display();
}
else
@@ -284,9 +282,8 @@ void cOsdMenu::CursorUp(void)
void cOsdMenu::CursorDown(void)
{
int last = Count() - 1;
- int lastOnScreen = first + displayMenuItems - 1;
-
if (current < last) {
+ int lastOnScreen = first + displayMenuItems - 1;
int tmpCurrent = current;
while (++tmpCurrent <= last && !SelectableItem(tmpCurrent))
;
@@ -296,14 +293,9 @@ void cOsdMenu::CursorDown(void)
DisplayCurrent(false);
current = tmpCurrent;
if (current > lastOnScreen) {
- first += displayMenuItems - 1;
- lastOnScreen = first + displayMenuItems - 1;
- if (lastOnScreen > last) {
- first = last - (displayMenuItems - 1);
- lastOnScreen = last;
- }
- if (Setup.MenuScrollPage)
- current = !SelectableItem(lastOnScreen) ? lastOnScreen - 1 : lastOnScreen;
+ first = Setup.MenuScrollPage ? current : max(0, current - displayMenuItems + 1);
+ if (first + displayMenuItems > last)
+ first = max(0, last - displayMenuItems + 1);
Display();
}
else