Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 25066 - Menu bar mnemonics do not work in GTK
Summary: Menu bar mnemonics do not work in GTK
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Linux-GTK
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 48848 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-18 13:16 EDT by Tod Creasey CLA
Modified: 2005-02-14 11:20 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2002-10-18 13:16:59 EDT
Build 20021017

The menu bar mnemonics in GTK do not work.

STEPS
1) Select a view
2) Hit F10 - File entry  will be highlighted
3) Hit the key for one of other mnemonics - nothing will happen
Comment 1 Tod Creasey CLA 2002-10-18 13:19:26 EDT
The problem is more that the menu gets rendered when you hit F10 so any atempts
to use the mnemonics for the bar are lost as the menu takes the keystroke.
Comment 2 Steve Northover CLA 2002-10-21 15:21:15 EDT
Seems to work fine in gedit (another GTK app).  NOTE:  It only seems to fail 
when using F10 to access the menu.  Typing Alt+F to get the file menu and then 
typing the mnemonic works.
Comment 3 Douglas Pollock CLA 2003-12-16 10:32:35 EST
*** Bug 48848 has been marked as a duplicate of this bug. ***
Comment 4 Douglas Pollock CLA 2003-12-16 10:34:27 EST
Mnemonics should work -- even if the menu is triggered by "F10".  Notice that
opening the menu with a mnemonic allows other mnemonics to work.  Opening the
menu with "F10" or the mouse does not allow mnemonics to work (contrary to other
gtk apps).
Comment 5 Billy Biggs CLA 2005-02-12 00:49:47 EST
Doug, I think whatever application you were using may have fooled you, as this
is definitely platform behaviour.  Eclipse's menus act the same as other GTK+
applications on my system.

When you hit F10, the menu appears, but focus is still in the menu bar itself. 
Mnemonics for other top-level menus work a this point.  F10 + W will open the
Window menu, for example.  Hitting the down arrow also brings focus into a
specific menu.  Once focus is inside the menu, the mnemonics in there work. 
Here is a bug report which shows the upstream intent:

  http://bugzilla.gnome.org/show_bug.cgi?id=80559

I am closing this as WONTFIX.
Comment 6 Douglas Pollock CLA 2005-02-12 13:13:10 EST
I'm not sure why this bug was closed.  Let me explain.

The following applications bring focus to the first menu, post the menu, and
mnemonics are tied to the first menu: gedit, anjuta, gimp, gnome control center,
etc....

The following applications bring focus to the menu bar, do not post, and
mnemonics are tied to the menu bar (the behaviour described in Bug 80559): firefox

Eclipse brings focus to the file menu and posts the file menu, but yet mnemonics
don't work anywhere.  This is neither of the above options, and so I'm not sure
how you can say that Eclipse is acting in a native manner.

This occurs on KDE 3.3.2, GTK+ 2.4.14, with the GNOME applications pulled from
GNOME 2.8.1.
Comment 7 Billy Biggs CLA 2005-02-12 17:04:09 EST
I was able to reproduce the problem by reverting back to a GTK+ 2.4-series release.

There has been a change in GTK+ 2.6 to how mnemonics work for menu bars.  In
GTK+ 2.4 and earlier, mnemonics required the user to use Alt.  Hit F10 followed
by Alt-E in Eclipse.  This posts and focuses the Edit menu.  In GTK+ 2.6, you
can now just use F10 followed by E to post and focus the Edit menu.  See:

  http://bugzilla.gnome.org/show_bug.cgi?id=101309

GNOME applications using libbonoboui have a hack which forwards key press
events, causing mnemonics to work even though the menu bar still has focus, not
the posted menu.  When I created a small GTK+ test application, its behaviour
was identical to Eclipse when using F10.  The hack does not apply under GTK+
2.6, which is why GTK+ applications now all behave the same for me, including
Eclipse.  Some more discussion relevant to bonobo applications can be found here:

  http://bugzilla.gnome.org/show_bug.cgi?id=89336

One thing that puzzles me though is that Eclipse and gimp (which does not use
bonobo either) both have the same F10 behaviour on my machine.  Hitting F10 and
then Q does not quit the gimp for me (gimp 2.0.2) under GTK+ 2.4.  Can you try
again with yours?
Comment 8 Douglas Pollock CLA 2005-02-12 17:11:24 EST
You are right: GIMP and Eclipse have the same behaviour.  The information about
bonobo fills in the missing piece in my head.  Feel free to close this bug again.
Comment 9 Billy Biggs CLA 2005-02-14 11:20:26 EST
WONTFIX since this is platform behaviour.