Re: Popping up a menu using a keystroke



Padraig O'Briain wrote:

> If gtk_menu_popup() is called because of a keystroke event, the first menu item 
> in the menu is selected. The first menu item is not selected if gtk_menu_popup() 
> is called because of a button press. The comments in the code refer to this as a 
> "bad hack".
>
> What is the reason for selecting the first menu item?

I don't know, but my guess would be that somebody (possibly even me, at
the time!) thought that if you popped up a menu with the keyboard, it
would make sense to automatically select the first item as it would save
you a further keypress to select the first item.

That's probably still true in the general case, but if that is the
reasoning behind it, I wouldn't have any objection if it was changed to
work the same as the button 3 case.  (Assuming that a posted context
menu, with no title and no items selected on it, wouldn't cause any
headaches for assistive technologies...)

Cheeri,
Calum.

-- 
CALUM BENSON, Usability Engineer       Sun Microsystems Ireland
mailto:calum benson ireland sun com    Desktop Engineering Group
http://www.sun.ie                      +353 1 819 9771

Any opinions are personal and not necessarily those of Sun Microsystems



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]