After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692754 - power: Mnemonics don't work
power: Mnemonics don't work
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
git master
Other Linux
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-29 01:00 UTC by Jeremy Bicha
Modified: 2013-01-30 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: drop mnemonics from labels (3.29 KB, patch)
2013-01-29 01:01 UTC, Jeremy Bicha
none Details | Review
power: Fix mnemonic activation (5.59 KB, patch)
2013-01-29 02:31 UTC, Matthias Clasen
committed Details | Review

Description Jeremy Bicha 2013-01-29 01:00:03 UTC
Pressing and holding the Alt key in the Power panel reveals that several (but not all) items have mnemonics set. When I try to active one with say Alt+W to focus the Wi-Fi box, nothing happens.

We should either drop the mnemonics (which is what my attached patch does since it's easy) or we should fix the mnemonics so that they work (which we might have to do anyway if it is EggListBox which is broken).
Comment 1 Jeremy Bicha 2013-01-29 01:01:16 UTC
Created attachment 234682 [details] [review]
power: drop mnemonics from labels

Mnemonics don't seem to work with EggListBox so let's drop them for now
Comment 2 Matthias Clasen 2013-01-29 02:31:07 UTC
Created attachment 234687 [details] [review]
power: Fix mnemonic activation

There were some stupid mistakes, where we didn't set up the
right mnemonic widgets due to variable reuse. For the automatic
suspend row, we have to work a little harder to make mnemonic
activation work, by connecting directly to ::mnemonic-activate.
Comment 3 Matthias Clasen 2013-01-29 02:31:47 UTC
Nothing to do with EggListBox, really
Comment 4 Jeremy Bicha 2013-01-29 03:56:14 UTC
Ok, this works except that the keyboard focus only changes for Alt+S, Alt+M (or at least on my computer, Alt+C). For the others, the widget is activated but the keyboard focus remains on the previous selection.
Comment 5 Matthias Clasen 2013-01-29 05:59:45 UTC
yeah, that is the gtk behaviour: if the mnemonic target is activatable, activate it, otherwise focus it.
Comment 6 Jeremy Bicha 2013-01-29 06:11:03 UTC
Why can't it do both? For instance, using Alt+R and Alt+B in the Keyboard panel both focuses and activates the checkbox. Why should a checkbox be different than a switch?
Comment 7 Bastien Nocera 2013-01-29 10:47:27 UTC
Review of attachment 234687 [details] [review]:

Looks good.
Comment 8 Matthias Clasen 2013-01-29 11:46:50 UTC
(In reply to comment #6)
> Why can't it do both? For instance, using Alt+R and Alt+B in the Keyboard panel
> both focuses and activates the checkbox. Why should a checkbox be different
> than a switch?

There's no checkbox in the keyboard panel, its cell renderers. Those are different...

I'm not saying it can't be different, I'm just explaining that what you are seeing is intentional behaviour of gtk, not a listbox or control-center bug...
Comment 9 Matthias Clasen 2013-01-29 11:56:29 UTC
Comment on attachment 234687 [details] [review]
power: Fix mnemonic activation

Attachment 234687 [details] pushed as f3b8b5f - power: Fix mnemonic activation