[gimp/gimp-2-8] app: remove "remove_children" parameter from gimp_image_item_list_filter()



commit afd4602957ae280e7b53187440cd416838bc68ba
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jun 20 22:04:03 2015 +0200

    app: remove "remove_children" parameter from gimp_image_item_list_filter()
    
    It was always TRUE. The function should be renamed now, but not until
    the merging of linked item fixes to 2-8 is done.
    
    (cherry picked from commit 6d6efbbf8b4676a5ac556f9644c0fa755e52a790)

 app/core/gimpimage-item-list.c    |   26 +++++++++++---------------
 app/core/gimpimage-item-list.h    |    3 +--
 app/core/gimpimage-scale.c        |    2 +-
 app/core/gimpitem-linked.c        |   10 +++++-----
 app/tools/gimpeditselectiontool.c |   12 ++++++------
 5 files changed, 24 insertions(+), 29 deletions(-)
---
diff --git a/app/core/gimpimage-item-list.c b/app/core/gimpimage-item-list.c
index f26599e..1c7ab3b 100644
--- a/app/core/gimpimage-item-list.c
+++ b/app/core/gimpimage-item-list.c
@@ -241,8 +241,7 @@ gimp_image_item_list_remove_children (GList          *list,
 
 GList *
 gimp_image_item_list_filter (const GimpItem *exclude,
-                             GList          *list,
-                             gboolean        remove_children)
+                             GList          *list)
 {
   GList *l;
 
@@ -251,22 +250,19 @@ gimp_image_item_list_filter (const GimpItem *exclude,
   if (! list)
     return NULL;
 
-  if (remove_children)
-    {
-      if (exclude)
-        list = gimp_image_item_list_remove_children (list, exclude);
+  if (exclude)
+    list = gimp_image_item_list_remove_children (list, exclude);
 
-      for (l = list; l; l = g_list_next (l))
-        {
-          GimpItem *item = l->data;
-          GList    *next;
+  for (l = list; l; l = g_list_next (l))
+    {
+      GimpItem *item = l->data;
+      GList    *next;
 
-          next = gimp_image_item_list_remove_children (g_list_next (l), item);
+      next = gimp_image_item_list_remove_children (g_list_next (l), item);
 
-          l->next = next;
-          if (next)
-            next->prev = l;
-        }
+      l->next = next;
+      if (next)
+        next->prev = l;
     }
 
   return list;
diff --git a/app/core/gimpimage-item-list.h b/app/core/gimpimage-item-list.h
index 4823057..ae17e98 100644
--- a/app/core/gimpimage-item-list.h
+++ b/app/core/gimpimage-item-list.h
@@ -53,8 +53,7 @@ GList * gimp_image_item_list_get_list  (const GimpImage        *image,
                                         GimpItemSet             set);
 
 GList * gimp_image_item_list_filter    (const GimpItem         *exclude,
-                                        GList                  *list,
-                                        gboolean                remove_children);
+                                        GList                  *list);
 
 
 #endif /* __GIMP_IMAGE_ITEM_LIST_H__ */
diff --git a/app/core/gimpimage-scale.c b/app/core/gimpimage-scale.c
index 12ba40c..b28e2d9 100644
--- a/app/core/gimpimage-scale.c
+++ b/app/core/gimpimage-scale.c
@@ -286,7 +286,7 @@ gimp_image_scale_check (const GimpImage *image,
                                              GIMP_ITEM_TYPE_CHANNELS,
                                              GIMP_ITEM_SET_ALL);
 
-  gimp_image_item_list_filter (NULL, drawables, TRUE);
+  gimp_image_item_list_filter (NULL, drawables);
 
   drawables = g_list_prepend (drawables, gimp_image_get_mask (image));
 
diff --git a/app/core/gimpitem-linked.c b/app/core/gimpitem-linked.c
index af90f9f..d2a618c 100644
--- a/app/core/gimpitem-linked.c
+++ b/app/core/gimpitem-linked.c
@@ -48,7 +48,7 @@ gimp_item_linked_translate (GimpItem *item,
                                         GIMP_ITEM_TYPE_ALL,
                                         GIMP_ITEM_SET_LINKED);
 
-  list = gimp_image_item_list_filter (item, list, TRUE);
+  list = gimp_image_item_list_filter (item, list);
 
   gimp_image_item_list_translate (gimp_item_get_image (item), list,
                                   offset_x, offset_y, push_undo);
@@ -74,7 +74,7 @@ gimp_item_linked_flip (GimpItem            *item,
                                         GIMP_ITEM_TYPE_ALL,
                                         GIMP_ITEM_SET_LINKED);
 
-  list = gimp_image_item_list_filter (item, list, TRUE);
+  list = gimp_image_item_list_filter (item, list);
 
   gimp_image_item_list_flip (gimp_item_get_image (item), list, context,
                              flip_type, axis, clip_result);
@@ -102,7 +102,7 @@ gimp_item_linked_rotate (GimpItem         *item,
                                         GIMP_ITEM_TYPE_VECTORS,
                                         GIMP_ITEM_SET_LINKED);
 
-  list = gimp_image_item_list_filter (item, list, TRUE);
+  list = gimp_image_item_list_filter (item, list);
 
   gimp_image_item_list_rotate (gimp_item_get_image (item), list, context,
                                rotate_type, center_x, center_y, clip_result);
@@ -113,7 +113,7 @@ gimp_item_linked_rotate (GimpItem         *item,
                                         GIMP_ITEM_TYPE_CHANNELS,
                                         GIMP_ITEM_SET_LINKED);
 
-  list = gimp_image_item_list_filter (item, list, TRUE);
+  list = gimp_image_item_list_filter (item, list);
 
   gimp_image_item_list_rotate (gimp_item_get_image (item), list, context,
                                rotate_type, center_x, center_y, TRUE);
@@ -143,7 +143,7 @@ gimp_item_linked_transform (GimpItem               *item,
                                         GIMP_ITEM_TYPE_ALL,
                                         GIMP_ITEM_SET_LINKED);
 
-  list = gimp_image_item_list_filter (item, list, TRUE);
+  list = gimp_image_item_list_filter (item, list);
 
   gimp_image_item_list_transform (gimp_item_get_image (item), list, context,
                                   matrix, direction,
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index 0d61f13..d2ebbe9 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -360,7 +360,7 @@ gimp_edit_selection_tool_start (GimpTool          *parent_tool,
                                                     GIMP_ITEM_TYPE_LAYERS,
                                                     GIMP_ITEM_SET_LINKED);
 
-            linked = gimp_image_item_list_filter (active_item, linked, TRUE);
+            linked = gimp_image_item_list_filter (active_item, linked);
 
             /*  Expand the rectangle to include all linked layers as well  */
             for (list = linked; list; list = g_list_next (list))
@@ -403,7 +403,7 @@ gimp_edit_selection_tool_start (GimpTool          *parent_tool,
                                                       GIMP_ITEM_TYPE_VECTORS,
                                                       GIMP_ITEM_SET_LINKED);
 
-              linked = gimp_image_item_list_filter (active_item, linked, TRUE);
+              linked = gimp_image_item_list_filter (active_item, linked);
 
               for (list = linked; list; list = g_list_next (list))
                 {
@@ -535,7 +535,7 @@ gimp_edit_selection_tool_button_release (GimpTool              *tool,
                                                       GIMP_ITEM_TYPE_CHANNELS,
                                                       GIMP_ITEM_SET_LINKED);
 
-              linked = gimp_image_item_list_filter (active_item, linked, TRUE);
+              linked = gimp_image_item_list_filter (active_item, linked);
 
               gimp_image_item_list_translate (image,
                                               linked,
@@ -667,7 +667,7 @@ gimp_edit_selection_tool_update_motion (GimpEditSelectionTool *edit_select,
                                                       GIMP_ITEM_TYPE_VECTORS,
                                                       GIMP_ITEM_SET_LINKED);
 
-              linked = gimp_image_item_list_filter (active_item, linked, TRUE);
+              linked = gimp_image_item_list_filter (active_item, linked);
 
               gimp_image_item_list_translate (image,
                                               linked,
@@ -880,7 +880,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
                                                     GIMP_ITEM_TYPE_LAYERS,
                                                     GIMP_ITEM_SET_LINKED);
 
-            linked = gimp_image_item_list_filter (active_item, linked, TRUE);
+            linked = gimp_image_item_list_filter (active_item, linked);
 
             for (list = linked; list; list = g_list_next (list))
               {
@@ -929,7 +929,7 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
                                                     GIMP_ITEM_TYPE_VECTORS,
                                                     GIMP_ITEM_SET_LINKED);
 
-            linked = gimp_image_item_list_filter (active_item, linked, TRUE);
+            linked = gimp_image_item_list_filter (active_item, linked);
 
             for (list = linked; list; list = g_list_next (list))
               {


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