Home-End keys in menu
PATCH 1/1 Home-End keys in menu
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,
Signature · 2 lines
Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona
menu.c +16 -0
@@ -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 )
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,
Quoted 59 lines · Carles Pina i Estany
Hello,
Last weekend we talked about "menu loop" (wrapping):
http://lists.gnu.org/archive/html/grub-devel/2008-07/msg00319.htmlConclusion: 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 "caseGRUB_TERM_UP" innormal/menu.cline 400 aprox. These constants are defined ininclude/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,
Signature · 5 lines
Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona Index: normal/menu.c ===================================================================menu.c +16
-0@@ -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
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Carles Pina i Estany GPG id: 0x17756391 http://pinux.info
menu.c +16 -0
@@ -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 )
Hi,
Quoted 7 lines · Carles Pina i Estany
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:
* menu/normal.c (foo): Blah blah.
And end a sentence with a "."
Quoted 6 lines
Quoted 6 lines
Index:
normal/menu.c
===================================================================menu.c +0
-0@@ -405,6 +405,22 @@
Quoted 7 lines
menu.c line 412
Quoted 7 lines
menu.c +5
-0switch (c) { +case GRUB_TERM_HOME : + first=0 ; + offset=0 ; +print_entries (menu, first, offset); +break ;
The indentation of the case statement doesn't seem right...
Quoted 6 lines
menu.c line 419
Quoted 6 lines
menu.c +6
-0+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 ;
This indentation also looks funny...
Quoted 21 lines
Quoted 12 lines
menu.c +4
-0+ } +print_entries (menu, first, offset); +break ; +case 16 :case '^' :if (offset >0 )_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-develSignature · 7 lines
Carles Pina i Estany GPG id: 0x17756391 http://pinux.info _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
Hello,
Quoted 10 lines · Marco Gerards
Quoted 7 lines
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-menuThe first line of the changelog entry is missing (name + e-mail address). Please mention the function you change like:
done! (see below)
[...]
Quoted 1 line
The indentation of the case statement doesn't seem right...
[...]
Quoted 1 line
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 <[email protected]>
* menu/normal.c (run_menu): Add Home and End keys in grub-menu.
-------
Patch is attached.
Thank you,
Signature · 2 lines
Carles Pina i Estany GPG id: 0x17756391 http://pinux.info
menu.c +16 -0
@@ -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 )
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 3 lines
2008-08-06 Carles Pina i Estany <[email protected]>
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.
This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
--
Marco
Quoted 6 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 7 lines
Quoted 3 lines
2008-08-06 Carles Pina i Estany <[email protected]>
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
Why don't we use PgUp / PgDn instead? That's more intuitive.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Quoted 9 lines · Robert Millan
Quoted 8 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 2 lines
2008-08-06 Carles Pina i Estany <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
Why don't we use PgUp / PgDn instead? That's more intuitive.
Or both?
--
Marco
Quoted 9 lines · Robert Millan
Quoted 8 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 2 lines
2008-08-06 Carles Pina i Estany <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
Why don't we use PgUp / PgDn instead? That's more intuitive.
Users with long menu lists may expect PgUp/PgDn to take them exactly _one_ page up or down, not the whole list... I personally think that Home/End are more intuitive for this particular UI interaction.
Quoted 13 lines · Javier Martín
Quoted 12 lines · Robert Millan
Quoted 11 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 3 lines
2008-08-06 Carles Pina i Estany <[email protected]>
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
Why don't we use PgUp / PgDn instead? That's more intuitive.
Users with long menu lists may expect PgUp/PgDn to take them exactly _one_ page up or down, not the whole list... I personally think that Home/End are more intuitive for this particular UI interaction.
Uhm you're right. Also, I notice this behaviour is consistent with `less' (and since I love consistency, I must agree with you!)
I think the patch is fine in its current state.
Signature · 5 lines
Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."
Hello,
I reply in this message a different things.
Quoted 11 lines · Robert Millan
Quoted 10 lines · Javier Martín
Quoted 9 lines · Robert Millan
Quoted 8 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 2 lines
2008-08-06 Carles Pina i Estany <[email protected]>
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
Why don't we use PgUp / PgDn instead? That's more intuitive.
I think that we should use Home/End and PgUp/PgDn for different things:
-Home/End: go straight to the first and last entry (this is done)
-PgUp/PgDn: it moves one page (I mean, selected item = selected item + number of items)
I've implemented only Home/End key (by the moment, we can talk about PgUp/PgDn later please :-) )
Quoted 8 lines
Quoted 3 lines
Users with long menu lists may expect PgUp/PgDn to take them exactly _one_ page up or down, not the whole list... I personally think that Home/End are more intuitive for this particular UI interaction.
Uhm you're right. Also, I notice this behaviour is consistent with `less' (and since I love consistency, I must agree with you!)
I think the patch is fine in its current state.
me too ;-)
Signature · 2 lines
Carles Pina i Estany GPG id: 0x17756391 http://pinux.info
Hi,
Quoted 6 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 7 lines
Quoted 3 lines
2008-08-06 Carles Pina i Estany <[email protected]>
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
after this comment, Robert and Javier comments, feel free (somebody) to commit it (I cannot commit, so I will not commmit :-) -just in case somebody is expecting that I commit myself)
The message with the patch:
http://lists.gnu.org/archive/html/grub-devel/2008-08/msg00171.html
Thanks,
Signature · 2 lines
Carles Pina i Estany GPG id: 0x17756391 http://pinux.info
Commited.
Am Samstag, den 16.08.2008, 20:51 +0200 schrieb Carles Pina i Estany:
Quoted 28 lines
Hi,
Quoted 6 lines · Marco Gerards
Hi,
Carles Pina i Estany <[email protected]> writes:
[...]
Quoted 7 lines
Quoted 3 lines
2008-08-06 Carles Pina i Estany <[email protected]>
*
menu/normal.c(run_menu): Add Home and End keys in grub-menu.This looks fine to me at first sight. Do others have problems with this? Otherwise it can be committed.
after this comment, Robert and Javier comments, feel free (somebody) to commit it (I cannot commit, so I will not commmit :-) -just in case somebody is expecting that I commit myself)
The message with the patch:
http://lists.gnu.org/archive/html/grub-devel/2008-08/msg00171.html
Thanks,