Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KKKfZ-0008E6-48 for mharc-grub-devel@gnu.org; Sat, 19 Jul 2008 18:12:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKKfX-0008Cx-PR for grub-devel@gnu.org; Sat, 19 Jul 2008 18:12:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKKfW-0008Bl-DU for grub-devel@gnu.org; Sat, 19 Jul 2008 18:12:46 -0400 Received: from [199.232.76.173] (port=37335 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKKfW-0008Bi-8N for grub-devel@gnu.org; Sat, 19 Jul 2008 18:12:46 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:50619 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKKfV-0004ea-KO for grub-devel@gnu.org; Sat, 19 Jul 2008 18:12:46 -0400 Received: from pinux (unknown [192.168.0.111]) by mail.pina.cat (Postfix) with ESMTP id C68BB288F2FDE for ; Sun, 20 Jul 2008 00:12:44 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id E199D198ED; Sun, 20 Jul 2008 00:12:43 +0200 (CEST) Date: Sun, 20 Jul 2008 00:12:43 +0200 From: Carles Pina i Estany To: The development of GRUB 2 Message-ID: <20080719221243.GB4419@pina.cat> References: <20080717212227.GA11725@pina.cat> <20080719154043.GG23778@thorin> <20080719172134.GA3760@pina.cat> <20080719195251.GA10533@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <20080719195251.GA10533@thorin> User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: menu loop (patch) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2008 22:12:48 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Jul/19/2008, Robert Millan wrote: > On Sat, Jul 19, 2008 at 07:21:34PM +0200, Carles Pina i Estany wrote: > > > I'm not sure if this is intentional. Size is not important in this > > > part of the code, but in other UI menus (e.g. Iceweasel or GNOME) I > > > > fast check in KDE: it's looping > > > > Also, Iceweasel menus are looping here (maybe because it's executed > > in KDE and there is some GTK Widget with a different behaviour? I have > > no idea) > > I think it depends on the type of menu. Iceweasel's stored password list > doesn't loop, but pull-down menus do. I'm not sure if there's a rationale > for this.. I have searched but I haven't found any UI guidelines talking about it. And as you said, it depends of the kind of the menu (menu like menu or stored password list). I will keep searching/asking but I'm not sure if I will find something conclusive. > > > notice this is not done. It could also be a nuissance for users who > > > want to go rapidly to the top or bottom (sure, they can use PgUp/PgDn, > > > but then aren't we making the behaviour of those keys inconsistent > > > with arrows?). > > > > I would be glad to add some functionality for PgUp/PgDown and also for > > Home/End keys (I would do it today evening or tomorrow and send the > > patch). > > Actually, I just noticed we don't handle any of these. Don't worry about > that. I've just had some minutes and I wanted to play with this (only Home and End keys). I attach the patch, nothing important but fun. If PgUp/PgDown is also wanted I will play with it (or somebody else). (I agree that, nowadays and in laptops, Home and End keys are in some unexpected places :-( ) Also, I would change the line 400 aprox. in file normal/menu.c: case 14: by: case GRUB_TERM_DOWN: And case 16 by GRUB_TERM_UP This is defined in include/grub/term.h (I don't send a patch because is easy-easy and it's in the same zone than previous patch) Thanks, -- Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona --3V7upXqbjpZ4EhLz Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="home_end.patch" Index: normal/menu.c =================================================================== --- normal/menu.c (revision 1718) +++ normal/menu.c (working copy) @@ -405,6 +405,22 @@ switch (c) { + case GRUB_TERM_HOME: + first=0; + offset=0; + print_entries (menu, first, offset); + break; + + case GRUB_TERM_END: + offset = menu->size - 1; + if (offset > GRUB_TERM_NUM_ENTRIES - 1) + { + first = offset - (GRUB_TERM_NUM_ENTRIES - 1); + offset = GRUB_TERM_NUM_ENTRIES - 1; + } + print_entries (menu, first, offset); + break; + case 16: case '^': if (offset > 0) --3V7upXqbjpZ4EhLz--