[gimp/soc-2011-seamless-clone2] app: add new class GimpFilterStack factored out of GimpDrawableStack



commit 9b75ea86a4f8376fc00d9e839a568d1b45a4af14
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 11 04:12:10 2013 +0200

    app: add new class GimpFilterStack factored out of GimpDrawableStack
    
    and make it the parent class of GimpItemStack. Which means we now have
    a generic stack of filters independent of any image items.

 app/core/Makefile.am         |    2 +
 app/core/core-types.h        |    1 +
 app/core/gimpdrawablestack.c |  194 ---------------------------
 app/core/gimpdrawablestack.h |    6 +-
 app/core/gimpfilterstack.c   |  304 ++++++++++++++++++++++++++++++++++++++++++
 app/core/gimpfilterstack.h   |   54 ++++++++
 app/core/gimpgrouplayer.c    |    2 +-
 app/core/gimpimage.c         |    4 +-
 app/core/gimpitemstack.c     |    2 +-
 app/core/gimpitemstack.h     |    6 +-
 10 files changed, 369 insertions(+), 206 deletions(-)
---
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index 069c5a2..3371463 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -167,6 +167,8 @@ libappcore_a_sources = \
        gimpfilter.h                            \
        gimpfilteredcontainer.c                 \
        gimpfilteredcontainer.h                 \
+       gimpfilterstack.c                       \
+       gimpfilterstack.h                       \
        gimpfloatingselundo.c                   \
        gimpfloatingselundo.h                   \
        gimpgradient.c                          \
diff --git a/app/core/core-types.h b/app/core/core-types.h
index 0926318..af28586 100644
--- a/app/core/core-types.h
+++ b/app/core/core-types.h
@@ -91,6 +91,7 @@ typedef struct _GimpList              GimpList;
 typedef struct _GimpDocumentList      GimpDocumentList;
 typedef struct _GimpDrawableStack     GimpDrawableStack;
 typedef struct _GimpFilteredContainer GimpFilteredContainer;
+typedef struct _GimpFilterStack       GimpFilterStack;
 typedef struct _GimpItemStack         GimpItemStack;
 typedef struct _GimpTaggedContainer   GimpTaggedContainer;
 
diff --git a/app/core/gimpdrawablestack.c b/app/core/gimpdrawablestack.c
index 34abe8e..7142cbd 100644
--- a/app/core/gimpdrawablestack.c
+++ b/app/core/gimpdrawablestack.c
@@ -39,7 +39,6 @@ enum
 /*  local function prototypes  */
 
 static void   gimp_drawable_stack_constructed      (GObject           *object);
-static void   gimp_drawable_stack_finalize         (GObject           *object);
 
 static void   gimp_drawable_stack_add              (GimpContainer     *container,
                                                     GimpObject        *object);
@@ -49,11 +48,6 @@ static void   gimp_drawable_stack_reorder          (GimpContainer     *container
                                                     GimpObject        *object,
                                                     gint               new_index);
 
-static void   gimp_drawable_stack_add_node         (GimpDrawableStack *stack,
-                                                    GimpFilter        *filter);
-static void   gimp_drawable_stack_remove_node      (GimpDrawableStack *stack,
-                                                    GimpFilter        *filter);
-
 static void   gimp_drawable_stack_update           (GimpDrawableStack *stack,
                                                     gint               x,
                                                     gint               y,
@@ -96,7 +90,6 @@ gimp_drawable_stack_class_init (GimpDrawableStackClass *klass)
                   G_TYPE_INT);
 
   object_class->constructed = gimp_drawable_stack_constructed;
-  object_class->finalize    = gimp_drawable_stack_finalize;
 
   container_class->add      = gimp_drawable_stack_add;
   container_class->remove   = gimp_drawable_stack_remove;
@@ -127,20 +120,6 @@ gimp_drawable_stack_constructed (GObject *object)
 }
 
 static void
-gimp_drawable_stack_finalize (GObject *object)
-{
-  GimpDrawableStack *stack = GIMP_DRAWABLE_STACK (object);
-
-  if (stack->graph)
-    {
-      g_object_unref (stack->graph);
-      stack->graph = NULL;
-    }
-
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
 gimp_drawable_stack_add (GimpContainer *container,
                          GimpObject    *object)
 {
@@ -148,14 +127,6 @@ gimp_drawable_stack_add (GimpContainer *container,
 
   GIMP_CONTAINER_CLASS (parent_class)->add (container, object);
 
-  if (stack->graph)
-    {
-      GimpFilter *filter = GIMP_FILTER (object);
-
-      gegl_node_add_child (stack->graph, gimp_filter_get_node (filter));
-      gimp_drawable_stack_add_node (stack, filter);
-    }
-
   if (gimp_item_get_visible (GIMP_ITEM (object)))
     gimp_drawable_stack_drawable_visible (GIMP_ITEM (object), stack);
 }
@@ -166,14 +137,6 @@ gimp_drawable_stack_remove (GimpContainer *container,
 {
   GimpDrawableStack *stack = GIMP_DRAWABLE_STACK (container);
 
-  if (stack->graph)
-    {
-      GimpFilter *filter = GIMP_FILTER (object);
-
-      gimp_drawable_stack_remove_node (stack, filter);
-      gegl_node_remove_child (stack->graph, gimp_filter_get_node (filter));
-    }
-
   GIMP_CONTAINER_CLASS (parent_class)->remove (container, object);
 
   if (gimp_item_get_visible (GIMP_ITEM (object)))
@@ -186,16 +149,9 @@ gimp_drawable_stack_reorder (GimpContainer *container,
                              gint           new_index)
 {
   GimpDrawableStack *stack  = GIMP_DRAWABLE_STACK (container);
-  GimpFilter        *filter = GIMP_FILTER (object);
-
-  if (stack->graph)
-    gimp_drawable_stack_remove_node (stack, filter);
 
   GIMP_CONTAINER_CLASS (parent_class)->reorder (container, object, new_index);
 
-  if (stack->graph)
-    gimp_drawable_stack_add_node (stack, filter);
-
   if (gimp_item_get_visible (GIMP_ITEM (object)))
     gimp_drawable_stack_drawable_visible (GIMP_ITEM (object), stack);
 }
@@ -215,160 +171,10 @@ gimp_drawable_stack_new (GType drawable_type)
                        NULL);
 }
 
-GeglNode *
-gimp_drawable_stack_get_graph (GimpDrawableStack *stack)
-{
-  GList    *list;
-  GList    *reverse_list = NULL;
-  GeglNode *previous     = NULL;
-  GeglNode *output;
-
-  g_return_val_if_fail (GIMP_IS_DRAWABLE_STACK (stack), NULL);
-
-  if (stack->graph)
-    return stack->graph;
-
-  for (list = GIMP_LIST (stack)->list;
-       list;
-       list = g_list_next (list))
-    {
-      GimpFilter *filter = list->data;
-
-      reverse_list = g_list_prepend (reverse_list, filter);
-
-      if (! g_list_next (list))
-        gimp_filter_set_is_last_node (filter, TRUE);
-    }
-
-  stack->graph = gegl_node_new ();
-
-  for (list = reverse_list; list; list = g_list_next (list))
-    {
-      GimpFilter *filter = list->data;
-      GeglNode   *node   = gimp_filter_get_node (filter);
-
-      gegl_node_add_child (stack->graph, node);
-
-      if (previous)
-        gegl_node_connect_to (previous, "output",
-                              node,     "input");
-
-      previous = node;
-    }
-
-  g_list_free (reverse_list);
-
-  output = gegl_node_get_output_proxy (stack->graph, "output");
-
-  if (previous)
-    gegl_node_connect_to (previous, "output",
-                          output,   "input");
-
-  return stack->graph;
-}
-
 
 /*  private functions  */
 
 static void
-gimp_drawable_stack_add_node (GimpDrawableStack *stack,
-                              GimpFilter        *filter)
-{
-  GimpFilter *filter_above = NULL;
-  GimpFilter *filter_below;
-  GeglNode   *node_above;
-  GeglNode   *node;
-  gint        index;
-
-  node = gimp_filter_get_node (filter);
-
-  index = gimp_container_get_child_index (GIMP_CONTAINER (stack),
-                                          GIMP_OBJECT (filter));
-
-  if (index == 0)
-    {
-      node_above = gegl_node_get_output_proxy (stack->graph, "output");
-    }
-  else
-    {
-      filter_above = (GimpFilter *)
-        gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1);
-
-      node_above = gimp_filter_get_node (filter_above);
-    }
-
-  gegl_node_connect_to (node,       "output",
-                        node_above, "input");
-
-  filter_below = (GimpFilter *)
-    gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index + 1);
-
-  if (filter_below)
-    {
-      GeglNode *node_below = gimp_filter_get_node (filter_below);
-
-      gegl_node_connect_to (node_below, "output",
-                            node,       "input");
-    }
-  else
-    {
-      if (filter_above)
-        gimp_filter_set_is_last_node (filter_above, FALSE);
-
-      gimp_filter_set_is_last_node (filter, TRUE);
-    }
-}
-
-static void
-gimp_drawable_stack_remove_node (GimpDrawableStack *stack,
-                                 GimpFilter        *filter)
-{
-  GimpFilter *filter_above = NULL;
-  GimpFilter *filter_below;
-  GeglNode   *node_above;
-  GeglNode   *node;
-  gint        index;
-
-  node = gimp_filter_get_node (filter);
-
-  index = gimp_container_get_child_index (GIMP_CONTAINER (stack),
-                                          GIMP_OBJECT (filter));
-
-  if (index == 0)
-    {
-      node_above = gegl_node_get_output_proxy (stack->graph, "output");
-    }
-  else
-    {
-      filter_above = (GimpFilter *)
-        gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1);
-
-      node_above = gimp_filter_get_node (filter_above);
-    }
-
-  filter_below = (GimpFilter *)
-    gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index + 1);
-
-  if (filter_below)
-    {
-      GeglNode *node_below = gimp_filter_get_node (filter_below);
-
-      gegl_node_disconnect (node,       "input");
-      gegl_node_connect_to (node_below, "output",
-                            node_above, "input");
-    }
-  else
-    {
-      gegl_node_disconnect (node_above, "input");
-
-      gimp_filter_set_is_last_node (filter, FALSE);
-
-      if (filter_above)
-        gimp_filter_set_is_last_node (filter_above, TRUE);
-    }
-}
-
-static void
 gimp_drawable_stack_update (GimpDrawableStack *stack,
                             gint               x,
                             gint               y,
diff --git a/app/core/gimpdrawablestack.h b/app/core/gimpdrawablestack.h
index 805f27c..5197d13 100644
--- a/app/core/gimpdrawablestack.h
+++ b/app/core/gimpdrawablestack.h
@@ -36,8 +36,6 @@ typedef struct _GimpDrawableStackClass GimpDrawableStackClass;
 struct _GimpDrawableStack
 {
   GimpItemStack  parent_instance;
-
-  GeglNode      *graph;
 };
 
 struct _GimpDrawableStackClass
@@ -53,9 +51,7 @@ struct _GimpDrawableStackClass
 
 
 GType           gimp_drawable_stack_get_type  (void) G_GNUC_CONST;
-GimpContainer * gimp_drawable_stack_new       (GType              drawable_type);
-
-GeglNode      * gimp_drawable_stack_get_graph (GimpDrawableStack *stack);
+GimpContainer * gimp_drawable_stack_new       (GType drawable_type);
 
 
 #endif  /*  __GIMP_DRAWABLE_STACK_H__  */
diff --git a/app/core/gimpfilterstack.c b/app/core/gimpfilterstack.c
new file mode 100644
index 0000000..a101ddd
--- /dev/null
+++ b/app/core/gimpfilterstack.c
@@ -0,0 +1,304 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
+ *
+ * gimpfilterstack.c
+ * Copyright (C) 2008-2013 Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "core-types.h"
+
+#include "gimpfilter.h"
+#include "gimpfilterstack.h"
+
+
+/*  local function prototypes  */
+
+static void   gimp_filter_stack_constructed (GObject         *object);
+static void   gimp_filter_stack_finalize    (GObject         *object);
+
+static void   gimp_filter_stack_add         (GimpContainer   *container,
+                                             GimpObject      *object);
+static void   gimp_filter_stack_remove      (GimpContainer   *container,
+                                             GimpObject      *object);
+static void   gimp_filter_stack_reorder     (GimpContainer   *container,
+                                             GimpObject      *object,
+                                             gint             new_index);
+
+static void   gimp_filter_stack_add_node    (GimpFilterStack *stack,
+                                             GimpFilter      *filter);
+static void   gimp_filter_stack_remove_node (GimpFilterStack *stack,
+                                             GimpFilter      *filter);
+
+
+G_DEFINE_TYPE (GimpFilterStack, gimp_filter_stack, GIMP_TYPE_LIST);
+
+#define parent_class gimp_filter_stack_parent_class
+
+
+static void
+gimp_filter_stack_class_init (GimpFilterStackClass *klass)
+{
+  GObjectClass       *object_class    = G_OBJECT_CLASS (klass);
+  GimpContainerClass *container_class = GIMP_CONTAINER_CLASS (klass);
+
+  object_class->constructed = gimp_filter_stack_constructed;
+  object_class->finalize    = gimp_filter_stack_finalize;
+
+  container_class->add      = gimp_filter_stack_add;
+  container_class->remove   = gimp_filter_stack_remove;
+  container_class->reorder  = gimp_filter_stack_reorder;
+}
+
+static void
+gimp_filter_stack_init (GimpFilterStack *stack)
+{
+}
+
+static void
+gimp_filter_stack_constructed (GObject *object)
+{
+  GimpContainer *container = GIMP_CONTAINER (object);
+
+  G_OBJECT_CLASS (parent_class)->constructed (object);
+
+  g_assert (g_type_is_a (gimp_container_get_children_type (container),
+                         GIMP_TYPE_FILTER));
+}
+
+static void
+gimp_filter_stack_finalize (GObject *object)
+{
+  GimpFilterStack *stack = GIMP_FILTER_STACK (object);
+
+  if (stack->graph)
+    {
+      g_object_unref (stack->graph);
+      stack->graph = NULL;
+    }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gimp_filter_stack_add (GimpContainer *container,
+                       GimpObject    *object)
+{
+  GimpFilterStack *stack = GIMP_FILTER_STACK (container);
+
+  GIMP_CONTAINER_CLASS (parent_class)->add (container, object);
+
+  if (stack->graph)
+    {
+      GimpFilter *filter = GIMP_FILTER (object);
+
+      gegl_node_add_child (stack->graph, gimp_filter_get_node (filter));
+      gimp_filter_stack_add_node (stack, filter);
+    }
+}
+
+static void
+gimp_filter_stack_remove (GimpContainer *container,
+                          GimpObject    *object)
+{
+  GimpFilterStack *stack = GIMP_FILTER_STACK (container);
+
+  if (stack->graph)
+    {
+      GimpFilter *filter = GIMP_FILTER (object);
+
+      gimp_filter_stack_remove_node (stack, filter);
+      gegl_node_remove_child (stack->graph, gimp_filter_get_node (filter));
+    }
+
+  GIMP_CONTAINER_CLASS (parent_class)->remove (container, object);
+}
+
+static void
+gimp_filter_stack_reorder (GimpContainer *container,
+                           GimpObject    *object,
+                           gint           new_index)
+{
+  GimpFilterStack *stack  = GIMP_FILTER_STACK (container);
+  GimpFilter      *filter = GIMP_FILTER (object);
+
+  if (stack->graph)
+    gimp_filter_stack_remove_node (stack, filter);
+
+  GIMP_CONTAINER_CLASS (parent_class)->reorder (container, object, new_index);
+
+  if (stack->graph)
+    gimp_filter_stack_add_node (stack, filter);
+}
+
+
+/*  public functions  */
+
+GeglNode *
+gimp_filter_stack_get_graph (GimpFilterStack *stack)
+{
+  GList    *list;
+  GList    *reverse_list = NULL;
+  GeglNode *previous     = NULL;
+  GeglNode *output;
+
+  g_return_val_if_fail (GIMP_IS_FILTER_STACK (stack), NULL);
+
+  if (stack->graph)
+    return stack->graph;
+
+  for (list = GIMP_LIST (stack)->list;
+       list;
+       list = g_list_next (list))
+    {
+      GimpFilter *filter = list->data;
+
+      reverse_list = g_list_prepend (reverse_list, filter);
+
+      if (! g_list_next (list))
+        gimp_filter_set_is_last_node (filter, TRUE);
+    }
+
+  stack->graph = gegl_node_new ();
+
+  for (list = reverse_list; list; list = g_list_next (list))
+    {
+      GimpFilter *filter = list->data;
+      GeglNode   *node   = gimp_filter_get_node (filter);
+
+      gegl_node_add_child (stack->graph, node);
+
+      if (previous)
+        gegl_node_connect_to (previous, "output",
+                              node,     "input");
+
+      previous = node;
+    }
+
+  g_list_free (reverse_list);
+
+  output = gegl_node_get_output_proxy (stack->graph, "output");
+
+  if (previous)
+    gegl_node_connect_to (previous, "output",
+                          output,   "input");
+
+  return stack->graph;
+}
+
+
+/*  private functions  */
+
+static void
+gimp_filter_stack_add_node (GimpFilterStack *stack,
+                              GimpFilter        *filter)
+{
+  GimpFilter *filter_above = NULL;
+  GimpFilter *filter_below;
+  GeglNode   *node_above;
+  GeglNode   *node;
+  gint        index;
+
+  node = gimp_filter_get_node (filter);
+
+  index = gimp_container_get_child_index (GIMP_CONTAINER (stack),
+                                          GIMP_OBJECT (filter));
+
+  if (index == 0)
+    {
+      node_above = gegl_node_get_output_proxy (stack->graph, "output");
+    }
+  else
+    {
+      filter_above = (GimpFilter *)
+        gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1);
+
+      node_above = gimp_filter_get_node (filter_above);
+    }
+
+  gegl_node_connect_to (node,       "output",
+                        node_above, "input");
+
+  filter_below = (GimpFilter *)
+    gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index + 1);
+
+  if (filter_below)
+    {
+      GeglNode *node_below = gimp_filter_get_node (filter_below);
+
+      gegl_node_connect_to (node_below, "output",
+                            node,       "input");
+    }
+  else
+    {
+      if (filter_above)
+        gimp_filter_set_is_last_node (filter_above, FALSE);
+
+      gimp_filter_set_is_last_node (filter, TRUE);
+    }
+}
+
+static void
+gimp_filter_stack_remove_node (GimpFilterStack *stack,
+                                 GimpFilter        *filter)
+{
+  GimpFilter *filter_above = NULL;
+  GimpFilter *filter_below;
+  GeglNode   *node_above;
+  GeglNode   *node;
+  gint        index;
+
+  node = gimp_filter_get_node (filter);
+
+  index = gimp_container_get_child_index (GIMP_CONTAINER (stack),
+                                          GIMP_OBJECT (filter));
+
+  if (index == 0)
+    {
+      node_above = gegl_node_get_output_proxy (stack->graph, "output");
+    }
+  else
+    {
+      filter_above = (GimpFilter *)
+        gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index - 1);
+
+      node_above = gimp_filter_get_node (filter_above);
+    }
+
+  filter_below = (GimpFilter *)
+    gimp_container_get_child_by_index (GIMP_CONTAINER (stack), index + 1);
+
+  if (filter_below)
+    {
+      GeglNode *node_below = gimp_filter_get_node (filter_below);
+
+      gegl_node_disconnect (node,       "input");
+      gegl_node_connect_to (node_below, "output",
+                            node_above, "input");
+    }
+  else
+    {
+      gegl_node_disconnect (node_above, "input");
+
+      gimp_filter_set_is_last_node (filter, FALSE);
+
+      if (filter_above)
+        gimp_filter_set_is_last_node (filter_above, TRUE);
+    }
+}
diff --git a/app/core/gimpfilterstack.h b/app/core/gimpfilterstack.h
new file mode 100644
index 0000000..1632011
--- /dev/null
+++ b/app/core/gimpfilterstack.h
@@ -0,0 +1,54 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
+ *
+ * gimpfilterstack.h
+ * Copyright (C) 2008-2013 Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_FILTER_STACK_H__
+#define __GIMP_FILTER_STACK_H__
+
+#include "gimplist.h"
+
+
+#define GIMP_TYPE_FILTER_STACK            (gimp_filter_stack_get_type ())
+#define GIMP_FILTER_STACK(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FILTER_STACK, 
GimpFilterStack))
+#define GIMP_FILTER_STACK_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILTER_STACK, 
GimpFilterStackClass))
+#define GIMP_IS_FILTER_STACK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FILTER_STACK))
+#define GIMP_IS_FILTER_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FILTER_STACK))
+
+
+typedef struct _GimpFilterStackClass GimpFilterStackClass;
+
+struct _GimpFilterStack
+{
+  GimpList  parent_instance;
+
+  GeglNode *graph;
+};
+
+struct _GimpFilterStackClass
+{
+  GimpListClass  parent_class;
+};
+
+
+GType      gimp_filter_stack_get_type  (void) G_GNUC_CONST;
+
+GeglNode * gimp_filter_stack_get_graph (GimpFilterStack *stack);
+
+
+#endif  /*  __GIMP_FILTER_STACK_H__  */
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index 303412f..9105031 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -952,7 +952,7 @@ gimp_group_layer_get_graph (GimpProjectable *projectable)
   private->graph = gegl_node_new ();
 
   layers_node =
-    gimp_drawable_stack_get_graph (GIMP_DRAWABLE_STACK (private->children));
+    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->children));
 
   gegl_node_add_child (private->graph, layers_node);
 
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 5ffec01..073ea85 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1300,12 +1300,12 @@ gimp_image_get_graph (GimpProjectable *projectable)
   private->graph = gegl_node_new ();
 
   layers_node =
-    gimp_drawable_stack_get_graph (GIMP_DRAWABLE_STACK (private->layers->container));
+    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->layers->container));
 
   gegl_node_add_child (private->graph, layers_node);
 
   channels_node =
-    gimp_drawable_stack_get_graph (GIMP_DRAWABLE_STACK (private->channels->container));
+    gimp_filter_stack_get_graph (GIMP_FILTER_STACK (private->channels->container));
 
   gegl_node_add_child (private->graph, channels_node);
 
diff --git a/app/core/gimpitemstack.c b/app/core/gimpitemstack.c
index 8016d09..021b642 100644
--- a/app/core/gimpitemstack.c
+++ b/app/core/gimpitemstack.c
@@ -40,7 +40,7 @@ static void   gimp_item_stack_remove      (GimpContainer *container,
                                            GimpObject    *object);
 
 
-G_DEFINE_TYPE (GimpItemStack, gimp_item_stack, GIMP_TYPE_LIST)
+G_DEFINE_TYPE (GimpItemStack, gimp_item_stack, GIMP_TYPE_FILTER_STACK)
 
 #define parent_class gimp_item_stack_parent_class
 
diff --git a/app/core/gimpitemstack.h b/app/core/gimpitemstack.h
index 195ec4e..09dd92e 100644
--- a/app/core/gimpitemstack.h
+++ b/app/core/gimpitemstack.h
@@ -21,7 +21,7 @@
 #ifndef __GIMP_ITEM_STACK_H__
 #define __GIMP_ITEM_STACK_H__
 
-#include "gimplist.h"
+#include "gimpfilterstack.h"
 
 
 #define GIMP_TYPE_ITEM_STACK            (gimp_item_stack_get_type ())
@@ -35,12 +35,12 @@ typedef struct _GimpItemStackClass GimpItemStackClass;
 
 struct _GimpItemStack
 {
-  GimpList  parent_instance;
+  GimpFilterStack  parent_instance;
 };
 
 struct _GimpItemStackClass
 {
-  GimpListClass  parent_class;
+  GimpFilterStackClass  parent_class;
 };
 
 


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