forked from AuroraMiddleware/gtk
Application: Do not reuse Ctrl+F1 for help-overlay
It just gets overridden to do something else, as the 1st GtkWidget’s class_init() adds it as a binding to toggle tooltips with the keyboard. The last entity to hook it (& return TRUE) is the only one who gets it. So, worse: If users needed to manually set accels for a ShortcutsWindow, coincidentally waited until after the 1st GtkWidget init() to do it, & copied what GtkApplication said in an attempt to be good & consistent — they inadvertently broke the keyboard tooltips (except for users with a GDK_KEY_KP_F1 – whatever that is) as their handler blocked GtkWidget’s. So, one side has to drop this accelerator, and it seems clear that being able to open tooltips with the keyboard is more important than having a second accel for the help-overlay. We can make up a replacement later. https://gitlab.gnome.org/GNOME/gtk/issues/626
This commit is contained in:
parent
9e0f43e8cb
commit
4b96e7fc78
@ -100,8 +100,8 @@
|
||||
* If there is a resource located at "gtk/help-overlay.ui" which
|
||||
* defines a #GtkShortcutsWindow with ID "help_overlay" then GtkApplication
|
||||
* associates an instance of this shortcuts window with each
|
||||
* #GtkApplicationWindow and sets up keyboard accelerators (Control-F1
|
||||
* and Control-?) to open it. To create a menu item that displays the
|
||||
* #GtkApplicationWindow and sets up the keyboard accelerator Control-?
|
||||
* to open it. To create a menu item that displays the
|
||||
* shortcuts window, associate the item with the action win.show-help-overlay.
|
||||
*
|
||||
* ## A simple application ## {#gtkapplication}
|
||||
@ -270,7 +270,7 @@ gtk_application_load_resources (GtkApplication *application)
|
||||
path = g_strconcat (base_path, "/gtk/help-overlay.ui", NULL);
|
||||
if (g_resources_get_info (path, G_RESOURCE_LOOKUP_FLAGS_NONE, NULL, NULL, NULL))
|
||||
{
|
||||
const gchar * const accels[] = { "<Primary>F1", "<Primary>question", NULL };
|
||||
const gchar * const accels[] = { "<Primary>question", NULL };
|
||||
|
||||
priv->help_overlay_path = path;
|
||||
gtk_application_set_accels_for_action (application, "win.show-help-overlay", accels);
|
||||
|
Loading…
Reference in New Issue
Block a user