[gegl] Fixed serialization code which was adding output pads to nodes which shouldn't have them (e.g. gegl:



commit 7038100ebb052a4981700db37f6bdbda81748294
Author: Isaac Wagner <isaacbw src gnome org>
Date:   Sun Jul 8 19:10:27 2012 -0400

    Fixed serialization code which was adding output pads to nodes which shouldn't have them (e.g. gegl:save, gegl:display)

 gegl/gegl-xml.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/gegl/gegl-xml.c b/gegl/gegl-xml.c
index 21d87e9..78d7511 100644
--- a/gegl/gegl-xml.c
+++ b/gegl/gegl-xml.c
@@ -257,7 +257,7 @@ static void start_element (GMarkupParseContext *context,
   if (!strcmp (element_name, "gegl") ||
       !strcmp (element_name, "image"))
     {
-      GeglNode *new = g_object_new (GEGL_TYPE_NODE, "operation", "gegl:nop", NULL);
+      GeglNode *new = gegl_node_new();
       if (pd->gegl == NULL)
         {
           pd->gegl = new;
@@ -267,11 +267,6 @@ static void start_element (GMarkupParseContext *context,
         }
       pd->state  = STATE_TREE_NORMAL;
       pd->parent = g_list_prepend (pd->parent, new);
-
-      gegl_node_get_output_proxy (new, "output"); /* creates the pad if it doesn't exist */
-      if (pd->iter)
-        gegl_node_connect_from (pd->iter, "input", new, "output");
-      pd->iter = gegl_node_get_output_proxy (new, "output");
     }
   else if (!strcmp (element_name, "graph"))
     {
@@ -386,7 +381,9 @@ static void start_element (GMarkupParseContext *context,
       else
         {
           if (pd->iter)
-            gegl_node_connect_from (pd->iter, "input", new, "output");
+	    {
+	      gegl_node_connect_from (pd->iter, "input", new, "output");
+	    }
         }
       pd->parent = g_list_prepend (pd->parent, new);
       pd->state  = STATE_TREE_FIRST_CHILD;
@@ -1095,8 +1092,6 @@ gegl_node_to_xml (GeglNode    *gegl,
   ss.clones      = g_hash_table_new (NULL, NULL);
   ss.terse       = FALSE;
 
-  gegl = gegl_node_get_output_proxy (gegl, "output");
-
   g_string_append (ss.buf, "<?xml version='1.0' encoding='UTF-8'?>\n");
   g_string_append (ss.buf, "<gegl>\n");
 



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