mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
actions: hide windows-display-* actions from the Shortcuts dialog
windows‑display* actions are used to switch open displays and are not meant to be remapped. They are implemented so they can be reassigned each time a display is opened, closed, or moved, in order to keep them aligned with the order of displays. This commit hides them from the Shortcuts dialog to prevent remapping and avoidinconsistent behavior. To avoid hiding these actions completely and making them harder to discover, this commit removes them only from the shortcuts dialog while still showing them in the action search. (see #11685)
This commit is contained in:
parent
95e32ebb34
commit
ebd5e1966e
3 changed files with 26 additions and 1 deletions
|
@ -318,7 +318,7 @@ gimp_action_history_search (Gimp *gimp,
|
|||
gboolean
|
||||
gimp_action_history_is_blacklisted_action (const gchar *action_name)
|
||||
{
|
||||
if (gimp_action_is_gui_blacklisted (action_name))
|
||||
if (gimp_action_is_action_search_blacklisted (action_name))
|
||||
return TRUE;
|
||||
|
||||
return (g_str_has_suffix (action_name, "-set") ||
|
||||
|
|
|
@ -758,6 +758,29 @@ gimp_action_name_compare (GimpAction *action1,
|
|||
|
||||
gboolean
|
||||
gimp_action_is_gui_blacklisted (const gchar *action_name)
|
||||
{
|
||||
static const gchar *prefixes[] =
|
||||
{
|
||||
"windows-display-"
|
||||
};
|
||||
|
||||
if (! (action_name && *action_name))
|
||||
return TRUE;
|
||||
|
||||
for (guint i = 0; i < G_N_ELEMENTS (prefixes); i++)
|
||||
{
|
||||
if (g_str_has_prefix (action_name, prefixes[i]))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gimp_action_is_action_search_blacklisted (action_name))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_action_is_action_search_blacklisted (const gchar *action_name)
|
||||
{
|
||||
static const gchar *prefixes[] =
|
||||
{
|
||||
|
|
|
@ -126,6 +126,8 @@ gint gimp_action_name_compare (GimpAction *action1,
|
|||
GimpAction *action2);
|
||||
|
||||
gboolean gimp_action_is_gui_blacklisted (const gchar *action_name);
|
||||
gboolean gimp_action_is_action_search_blacklisted
|
||||
(const gchar *action_name);
|
||||
|
||||
GimpContext * gimp_action_get_context (GimpAction *action);
|
||||
GimpViewable * gimp_action_get_viewable (GimpAction *action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue