From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQLEt-0004DP-SV for mharc-grub-devel@gnu.org; Tue, 05 Aug 2008 08:02:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQLEr-0004Ba-Ne for grub-devel@gnu.org; Tue, 05 Aug 2008 08:02:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQLEq-0004Aj-Gt for grub-devel@gnu.org; Tue, 05 Aug 2008 08:02:04 -0400 Received: from [199.232.76.173] (port=46518 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQLEq-0004AU-9z for grub-devel@gnu.org; Tue, 05 Aug 2008 08:02:04 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:50015 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQLEp-0001Ca-FV for grub-devel@gnu.org; Tue, 05 Aug 2008 08:02:03 -0400 Received: from pinux (144.81.221.87.dynamic.jazztel.es [87.221.81.144]) by mail.pina.cat (Postfix) with ESMTP id EF8CF288F2F28 for ; Tue, 5 Aug 2008 14:02:01 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id E17F043983; Tue, 5 Aug 2008 14:02:00 +0200 (CEST) Date: Tue, 5 Aug 2008 14:02:00 +0200 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20080805120200.GA15143@pina.cat> References: <20080721180723.GC7501@pina.cat> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <20080721180723.GC7501@pina.cat> 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: Tue, 05 Aug 2008 12:02:06 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, 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 Also, I added a comment that would be nice to change some magic numbers to constants that already exists. (I feel that it's a insignifcant patch compared with what I have seen here!) Thank you, On Jul/21/2008, Carles Pina i Estany wrote: > > > Hello, > > Last weekend we talked about "menu loop" (wrapping): > http://lists.gnu.org/archive/html/grub-devel/2008-07/msg00319.html > > Conclusion: people here don't like it (we could discuss for ages, I > think :-) ) > > Second proposal that maybe was hidden in so much text: to make it to > work Home and End keys. Patch is attached. Do you need a more formal > changelog for this? Adds Home and End key moving. > Comments are welcomed. > > Commend: I think that would be possible to change "case 14" by "case > GRUB_TERM_DOWN"; and "case 16" by "case GRUB_TERM_UP" in normal/menu.c > line 400 aprox. These constants are defined in include/grub/term.h. I > don't send a patch because it's in the same "zone" than attached patch > and it's easy-easy. > > Thanks for your patience, > > -- > Carles Pina i Estany GPG id: 0x8CBDAE64 > http://pinux.info Manresa - Barcelona > 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) > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Carles Pina i Estany GPG id: 0x17756391 http://pinux.info --tKW2IUtsqtDRztdT Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="home_end2.patch" Index: normal/menu.c =================================================================== --- normal/menu.c (revision 1774) +++ 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) --tKW2IUtsqtDRztdT--