[gimp] app: exclude undo/redo actions from history



commit 9653cdfc402de6772dc51f2a73d6fb3272509a06
Author: Ell <ell_se yahoo com>
Date:   Sat Feb 17 04:30:51 2018 -0500

    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.

 app/widgets/gimpaction-history.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpaction-history.c b/app/widgets/gimpaction-history.c
index 46c03c4..f0bad1a 100644
--- a/app/widgets/gimpaction-history.c
+++ b/app/widgets/gimpaction-history.c
@@ -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);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]