Skip to content

fix(linux): give menu items access keys - #3938

Merged
datlechin merged 3 commits into
mainfrom
fix/linux-menu-access-keys
Oct 31, 2026
Merged

datlechin merged 3 commits into
mainfrom
fix/linux-menu-access-keys

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Every menu item now has an access key, unique on its menu page, per the GNOME HIG (Menus: "Provide an access key for every menu item ... avoid duplicating access keys on the same menu"). This covers the main menu, the tab and tab overview menus, and every context and secondary menu: grid cell and header, sidebar, connection, history, saved queries, diagram, editor, find options.
  • Context menus are included: the HIG rule applies to all menus, and GTK's own text menu, Files, Text Editor and Web key theirs too.
  • Letters follow the HIG: the first letter where free, else another word's first letter, then a consonant. The primary menu matches GNOME's: _Preferences, _Keyboard Shortcuts, _About TablePro.
  • The editor's AI items keep clear of the letters GtkTextView and GtkSourceView already use on the same menu.
  • Items named by data (connections, groups, tags, tables, enum labels, page sizes) take no key and keep their underscores as text.
  • Safe Mode levels and colour names get keyed menu-only strings. The window title, the connect dialog, tooltips and drop-downs keep the plain ones.
  • vi.po: renamed each msgid that is no longer used anywhere else. Where the plain string is still used, the plain entry stays and a keyed entry is added. Vietnamese keys are unique per menu, counting untranslated items, and sit on an unaccented letter as GNOME's Vietnamese catalogues do.

Test plan

  • New test_support::access_keys helper: models GtkPopoverMenu pages (sections share a page, and a submenu page includes its title) and reports missing, doubled or shared keys.
  • every_menu_a_ui_file_holds_gives_each_item_its_own_access_key walks every <menu> in the UI resources. Per-module tests cover the Rust-built menus: grid, references, connection menu and each tree state, sidebar, tab and main menu with Safe Mode, history, saved queries, browse, diagram, and the editor context menu with GTK's own items. All of them fail on main.
  • Updated tests that look items up by their model label: connection menu, references, grid Column submenu, history menus, editor context menu.
  • No screenshots: no Linux display is available here. Build, tests and lint run on CI.

@datlechin
datlechin merged commit 973024b into main Oct 31, 2026
36 checks passed
@datlechin
datlechin deleted the fix/linux-menu-access-keys branch October 31, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant