VDR developer version 1.3.26

Message ID 42AD8F18.6080906@gmx.de
State New
Headers

Commit Message

Udo Richter June 13, 2005, 1:50 p.m. UTC
  Klaus Schmidinger wrote:
> Well, looks like the change in handling "page down" in menus
> made it impossible to get the last page of a menu to display
> full screen. Here's a small fix for that:

Ok, now that this is completely broken, lets try to clean it up. ;)

The basic question is, how should VDR behave at the end of menus? The
previous behavior wasn't perfect either, resulting in back-jumps: While
paging down, the last page got displayed partially filled, and the next
page down actually moved the visible range up, to completely fill the
last page.

My suggestion is to avoid empty lines at the end of the menu completely,
whenever possible. The attached patch (against original 1.3.26) does
this, and also restores the old behavior on single-page menus.

Cheers,

Udo
  

Comments

Dominique Simon June 14, 2005, 3:34 p.m. UTC | #1
Am 13.06.2005 um 15:50 schrieb Udo Richter:

> Ok, now that this is completely broken, lets try to clean it up. ;)
>

Thanks, your patch works great. Time for VDR 1.4 i guess ;)

Ciao, Dominique
  

Patch

--- vdr-1.3.26-original/osdbase.c	2005-06-12 12:44:22.000000000 +0200
+++ vdr-1.3.26/osdbase.c	2005-06-13 14:58:30.000000000 +0200
@@ -350,6 +350,10 @@ 
   current += displayMenuItems;
   first += displayMenuItems;
   int last = Count() - 1;
+  if (first + displayMenuItems > last) {
+     first = last - displayMenuItems + 1;
+     if (first < 0) first = 0;
+     }
   int tmpCurrent = current;
   while (!SelectableItem(tmpCurrent) && ++tmpCurrent <= last)
         ;