From patchwork Mon Jun 13 13:50:16 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Udo Richter X-Patchwork-Id: 11913 Received: from pop.gmx.de ([213.165.64.20] helo=mail.gmx.net) by www.linuxtv.org with smtp (Exim 4.34) id 1DhpM3-0000so-Lw for vdr@linuxtv.org; Mon, 13 Jun 2005 15:51:55 +0200 Received: (qmail invoked by alias); 13 Jun 2005 13:51:24 -0000 Received: from math-ws1.mathematik.uni-kassel.de (EHLO [127.0.0.1]) [141.51.166.3] by mail.gmx.net (mp022) with SMTP; 13 Jun 2005 15:51:24 +0200 X-Authenticated: #1417946 Message-ID: <42AD8F18.6080906@gmx.de> Date: Mon, 13 Jun 2005 15:50:16 +0200 From: Udo Richter User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050531) MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] VDR developer version 1.3.26 References: <42AC4846.4040201@cadsoft.de> <42AC4E66.20003@cadsoft.de> In-Reply-To: <42AC4E66.20003@cadsoft.de> X-Y-GMX-Trusted: 0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2005 13:51:55 -0000 Status: O X-Status: X-Keywords: X-UID: 3011 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 --- 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) ;