From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQnnO-0002Ws-VY for mharc-grub-devel@gnu.org; Wed, 06 Aug 2008 14:31:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQnnO-0002Wn-9G for grub-devel@gnu.org; Wed, 06 Aug 2008 14:31:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQnnN-0002WZ-JW for grub-devel@gnu.org; Wed, 06 Aug 2008 14:31:37 -0400 Received: from [199.232.76.173] (port=50447 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQnnN-0002WW-Db for grub-devel@gnu.org; Wed, 06 Aug 2008 14:31:37 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:40568 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQnnM-0002sc-Rz for grub-devel@gnu.org; Wed, 06 Aug 2008 14:31:37 -0400 Received: from pinux (144.81.221.87.dynamic.jazztel.es [87.221.81.144]) by mail.pina.cat (Postfix) with ESMTP id 4E0F72890653C for ; Wed, 6 Aug 2008 20:31:35 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id 206772B78; Wed, 6 Aug 2008 20:31:32 +0200 (CEST) Date: Wed, 6 Aug 2008 20:31:32 +0200 From: Carles Pina i Estany To: The development of GRUB 2 Message-ID: <20080806183131.GA5815@pina.cat> References: <20080721180723.GC7501@pina.cat> <20080805120200.GA15143@pina.cat> <8763qfeh54.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <8763qfeh54.fsf@xs4all.nl> User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] Home-End keys in menu 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: Wed, 06 Aug 2008 18:31:38 -0000 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, On Aug/05/2008, Marco Gerards wrote: > > Some weeks ago I sent a patch that didn't have any discussion. I'm > > sending it again, maybe everybody was in holidays :-) > > > > Actually I updated the patch (added some spaces to comply with the > > coding style). > > > > * menu/normal.c: Add Home and End keys in grub-menu > > The first line of the changelog entry is missing (name + e-mail > address). Please mention the function you change like: done! (see below) [...] > The indentation of the case statement doesn't seem right... [...] > This indentation also looks funny... was not right (not a problem, it's fixed now). Also, the indentation got worst in the mail :-) Changelog: ------- 2008-08-06 Carles Pina i Estany * menu/normal.c (run_menu): Add Home and End keys in grub-menu. ------- Patch is attached. Thank you, -- Carles Pina i Estany GPG id: 0x17756391 http://pinux.info --HcAYCG3uE/tztfnV Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="home_end3.patch" Index: normal/menu.c =================================================================== --- normal/menu.c (revision 1786) +++ 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) --HcAYCG3uE/tztfnV--