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 750465 - Shell modal dialog mnemonic support
Shell modal dialog mnemonic support
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-05 17:45 UTC by Daniel Kahn Gillmor
Modified: 2021-07-05 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of gcr-based pinentry under GNOME 3 (23.90 KB, image/jpeg)
2015-06-05 17:45 UTC, Daniel Kahn Gillmor
  Details
Strip out mnemonics indicator from ShellKeyringPrompt (2.50 KB, patch)
2015-06-07 22:05 UTC, Watson Yuuma Sato
committed Details | Review

Description Daniel Kahn Gillmor 2015-06-05 17:45:15 UTC
Created attachment 304666 [details]
screenshot of gcr-based pinentry under GNOME 3

Depending on the desktop environment and the type of UX widget, gcr system prompts only sometimes enable keyboard shortcut accelerators.

under GNOME 3, gcr buttons labeled with the string "_OK" display the full string (with the literal underscore), and cannot be "clicked" from the keyboard with ALT+O.

Under XFCE4, gcr buttons labeled with the string "_OK" display the string as "OK" and can be "clicked" from the keyboard with ALT+O.

When an option is presented to the user via gcr_prompt_set_choice_label() with an underscore in it, both desktop environments display the literal underscore, and neither of them enable keyboard shortcuts to the choice checkbox.

It would be great if gcr could enable the keyboard accelerators for all widgets under all desktop environments based on leading underscores, the way that buttons in the xfce4 context work.
Comment 1 Stef Walter 2015-06-06 05:40:34 UTC
As far as I can tell there's no support (or design) for mnemonics in the system modal gnome-shell prompts.

So if gnome-shell doesn't want mnemonics displayed (by design) then we should probably strip them out in gcr.

Alternatively gnome-shell (and it's ST toolkit) would gain support for button mnemonics.

A gnome-shell developer or designer would need to make the call here.
Comment 2 Stef Walter 2015-06-07 08:51:57 UTC
Yuuma, would you be interested in contributing a patch to gnome-shell which strips out the mnemonics? 

I think the relevant change would be in src/shell-keyring-prompt.c
Comment 3 Watson Yuuma Sato 2015-06-07 22:05:38 UTC
Created attachment 304736 [details] [review]
Strip out mnemonics indicator from ShellKeyringPrompt

Sure,

Please check if attached patch is enough, works for me.
Comment 4 Stef Walter 2015-06-08 05:07:31 UTC
Review of attachment 304736 [details] [review]:

Other than that, looks good.

::: src/shell-keyring-prompt.c
@@ +131,3 @@
+  while (*label != '\0')
+    {
+      if (*label == mnemonic)

A double underscore should be translated to an underscore. See documentation for gtk_button_new_mnemonic() and friends.
Comment 5 André Klapper 2015-06-08 08:04:43 UTC
Errm, so we actively remove a (non-working) accessibility feature here? 
Has this been discussed with the GNOME a11y folks?
Comment 6 Stef Walter 2015-06-08 08:07:09 UTC
It's currently a non-feature. If such a feature is desired, it should be added, and I don't mind this bug being used as a tracker for such a feature.

The first patch just maintains the status-quo and fixes the regression that results from bug #750514.
Comment 7 Watson Yuuma Sato 2015-06-08 09:50:32 UTC
(In reply to Stef Walter from comment #4)
> Review of attachment 304736 [details] [review] [review]:
> 
> Other than that, looks good.
> 
> ::: src/shell-keyring-prompt.c
> @@ +131,3 @@
> +  while (*label != '\0')
> +    {
> +      if (*label == mnemonic)
> 
> A double underscore should be translated to an underscore. See documentation
> for gtk_button_new_mnemonic() and friends.

The next character to an underscore is copied to output, even if it is an underscore.
Comment 8 Stef Walter 2015-06-08 16:05:40 UTC
Review of attachment 304736 [details] [review]:

In that case looks good to me. We probably want someone in gnome-shell to cross check this, and then I can push it.
Comment 9 Florian Müllner 2015-06-09 09:13:43 UTC
Review of attachment 304736 [details] [review]:

Looks good to me as well, except for a minor style issue

::: src/shell-keyring-prompt.c
@@ +133,3 @@
+      if (*label == mnemonic)
+        {
+          label++;

No braces around one-line blocks:
if (*label == mnemonic)
  label++;
Comment 10 Stef Walter 2015-06-09 09:47:21 UTC
Thanks Florian. Made minor style fix and pushed the interim fix patch 
to master. The mnemonics are now stripped out.

Lets leave this bug open for the gnome-shell guys to make a call about
use of mnemonics in system modal prompts.
Comment 11 Daniel Kahn Gillmor 2015-07-13 13:51:36 UTC
bug #752328 has been opened about mnemonics in gcr.
Comment 12 GNOME Infrastructure Team 2021-07-05 14:39:55 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.