Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #850295

Restore keyboard menu navigation to Gtk3.x clients

Added by Jacob Nevins about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-gtk-3
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

It turns out to be possible to have this in modern Gtk after all.

I think we got the wrong end of the stick about Gtk3 and mnemonics some years ago -- certainly I did -- based on this rant. We formed the impression that mnemonics (underlined characters on menus/buttons, accessed with Alt+key) were completely going away. (See e.g. gna bug #22736, gna bug #24192)

Since some years have passed and I am using various Gtk3 apps which still have such navigation, I investigated more closely. I had a look at the Gtk git repository to see if they had gone away and come back later, and found no evidence of this. All I now think happened was:
  • The "gtk-enable-mnemonics" property did go away. But the resulting behaviour is that mnemonics are always active, it's just that apps can no longer disable them. Some apps care about that (e.g. gnome-terminal), but we don't.
  • The underlines are no longer displayed by default; the user has to hold down Alt for a bit before they appear. (Much like modern Windows.)
  • (Icons on menu items did go away, but that's another matter.)

I have a patch to restore keyboard navigation to the Gtk3.22 client, and the 3.0+ Gtk3 client. I don't think it relies on any deprecated APIs. I have tested it only with Gtk 3.24.5 (Debian Buster) so far. If anyone thinks it's a bad idea, shout.

The patch generally doesn't fill in gaps of new menu items we've added since we got this idea about mnemonics.

This mostly removes strings, because Gtk3.22 now uses the same strings (with shortcuts) as older Gtk clients.

m-gtk3x-menu-mnemonics.patch (72 KB) m-gtk3x-menu-mnemonics.patch Jacob Nevins, 2019-12-01 05:16 AM
30-gtk3x-menu-mnemonics.patch (51.7 KB) 30-gtk3x-menu-mnemonics.patch Jacob Nevins, 2019-12-01 05:16 AM
26-gtk3x-menu-mnemonics.patch (24.5 KB) 26-gtk3x-menu-mnemonics.patch Jacob Nevins, 2019-12-01 05:16 AM

Related issues

Related to Freeciv - Feature #850296: 3.0+ Gtk3 client lacks mnemonics on action dialogsClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Freeciv - Feature #850297: Restore keyboard shortcuts for most buttonsClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Jacob Nevins about 1 year ago

  • Related to Feature #850296: 3.0+ Gtk3 client lacks mnemonics on action dialogs added

#2 Updated by Jacob Nevins about 1 year ago

  • Related to Feature #850297: Restore keyboard shortcuts for most buttons added

#4 Updated by Jacob Nevins about 1 year ago

Gtk4.0 patch is not even compile-tested.

#5 Updated by Jacob Nevins about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF