All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carles Pina i Estany <carles@pina.cat>
To: grub-devel@gnu.org
Subject: [PATCH] Home-End keys in menu
Date: Mon, 21 Jul 2008 20:07:23 +0200	[thread overview]
Message-ID: <20080721180723.GC7501@pina.cat> (raw)

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]



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

[-- Attachment #2: home_end.patch --]
[-- Type: text/x-diff, Size: 675 bytes --]

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)

             reply	other threads:[~2008-07-21 18:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21 18:07 Carles Pina i Estany [this message]
2008-08-05 12:02 ` [PATCH] Home-End keys in menu Carles Pina i Estany
2008-08-05 13:16   ` Marco Gerards
2008-08-06 18:31     ` Carles Pina i Estany
2008-08-13 10:15       ` Marco Gerards
2008-08-13 10:50         ` Robert Millan
2008-08-13 11:06           ` Marco Gerards
2008-08-13 11:38           ` Javier Martín
2008-08-13 11:44             ` Robert Millan
2008-08-13 15:31               ` Carles Pina i Estany
2008-08-16 18:51         ` Carles Pina i Estany
2008-08-17 10:30           ` Felix Zielcke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080721180723.GC7501@pina.cat \
    --to=carles@pina.cat \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.