[gimp] app: don't add blacklisted/excluded actions to the action history



commit 35ecf06f563d96a98924b2436a16fc17481abd36
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jan 13 21:26:27 2018 +0100

    app: don't add blacklisted/excluded actions to the action history
    
    gimp_action_history_init(): when deserializing the action history,
    check each action against gimp_action_history_excluded_action() so
    when we decide to exclude an action, it doesn't come back as history
    zombie from disk.

 app/widgets/gimpaction-history.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpaction-history.c b/app/widgets/gimpaction-history.c
index 745609e..aa079c4 100644
--- a/app/widgets/gimpaction-history.c
+++ b/app/widgets/gimpaction-history.c
@@ -138,12 +138,15 @@ gimp_action_history_init (Gimp *gimp)
                   break;
                 }
 
-              history.items =
-                g_list_insert_sorted (history.items,
-                                      gimp_action_history_item_new (action_name, count),
-                                      (GCompareFunc) gimp_action_history_init_compare_func);
+              if (! gimp_action_history_excluded_action (action_name))
+                {
+                  history.items =
+                    g_list_insert_sorted (history.items,
+                                          gimp_action_history_item_new (action_name, count),
+                                          (GCompareFunc) gimp_action_history_init_compare_func);
 
-              n_items++;
+                  n_items++;
+                }
 
               g_free (action_name);
             }


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