Commit 9653cdfc authored by Ell's avatar Ell

app: exclude undo/redo actions from history

The undo/redo actions' label changes based on context, and may
interfere with the labels of more relevant, but less frequent,
actions.

For example, after applying filter Foo, the label of edit-undo
becomes "Undo Foo", so searching for "Foo" results in both
edit-undo, and the action referring to the filter, with edit-undo
most likely appearing at the top of the list due to its frequency.

Excluding the undo/redo actions from the history is a simple, if
suboptimal, way to fix this.
parent 2816695e
......@@ -311,7 +311,9 @@ gimp_action_history_is_blacklisted_action (const gchar *action_name)
*
* Some actions should not be logged in the history, but should
* otherwise appear in the search results, since they correspond
* to different functions at different times.
* to different functions at different times, or since their
* label may interfere with more relevant, but less frequent,
* actions.
*/
gboolean
gimp_action_history_is_excluded_action (const gchar *action_name)
......@@ -319,7 +321,11 @@ gimp_action_history_is_excluded_action (const gchar *action_name)
if (gimp_action_history_is_blacklisted_action (action_name))
return TRUE;
return (g_strcmp0 (action_name, "filters-repeat") == 0 ||
return (g_strcmp0 (action_name, "edit-undo") == 0 ||
g_strcmp0 (action_name, "edit-strong-undo") == 0 ||
g_strcmp0 (action_name, "edit-redo") == 0 ||
g_strcmp0 (action_name, "edit-strong-redo") == 0 ||
g_strcmp0 (action_name, "filters-repeat") == 0 ||
g_strcmp0 (action_name, "filters-reshow") == 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment