From 48e194532ec533eb16f593c379a2bbe1022edb94 Mon Sep 17 00:00:00 2001 From: Aditya Tiwari Date: Thu, 26 Mar 2026 01:51:00 -0400 Subject: [PATCH] app: show "Tab" accelerator label for windows-hide-docks Tab was intentionally removed from the action entry to avoid overriding its standard accessibility usage across the software, leaving the menu item and shortcut editor showing no shortcut. This adds a cosmetic hint in gimp_action_get_display_accels() to show 'Tab' without registering a real accelerator. --- app/widgets/gimpaction.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/widgets/gimpaction.c b/app/widgets/gimpaction.c index 3f015730f4..dc44c22cb8 100644 --- a/app/widgets/gimpaction.c +++ b/app/widgets/gimpaction.c @@ -632,6 +632,20 @@ gimp_action_get_display_accels (GimpAction *action) accels = g_strdupv (GET_PRIVATE (action)->accels); + /* "windows-hide-docks" has no registered accelerator because Tab takes + * precedence over standard accessibility usage across the whole software. + * Inject a cosmetic display hint so the menu label and shortcut editor + * both show "Tab" without registering a real accelerator. + */ + if ((accels == NULL || accels[0] == NULL) && + g_strcmp0 (gimp_action_get_name (action), "windows-hide-docks") == 0) + { + g_strfreev (accels); + accels = g_new0 (gchar *, 2); + accels[0] = gtk_accelerator_get_label (GDK_KEY_Tab, 0); + return accels; + } + for (i = 0; accels != NULL && accels[i] != NULL; i++) { guint accel_key = 0;