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
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
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel