]> git.sur5r.net Git - glabels/commitdiff
Fixed parsing of Text->Line nodes: removed artifact "== 0".
authorJim Evins <evins@snaught.com>
Mon, 29 Sep 2003 03:16:29 +0000 (03:16 +0000)
committerJim Evins <evins@snaught.com>
Mon, 29 Sep 2003 03:16:29 +0000 (03:16 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@304 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/xml-label-04.c

index 7d05b78294d4e41366f6517179b561d66af7052b..2d9abd178dfd6fd90ddd480f088cb666a95a9bc4 100644 (file)
@@ -232,12 +232,14 @@ xml04_parse_text_props (xmlNodePtr    object_node,
 
                if (xmlStrEqual (line_node->name, "Line")) {
 
+                       gl_debug (DEBUG_XML, "->Line node");
+
                        nodes = NULL;
                        for (text_node = line_node->xmlChildrenNode;
                             text_node != NULL; text_node = text_node->next) {
 
-                               if (xmlStrEqual (text_node->name, "Field") ==
-                                   0) {
+                               if (xmlStrEqual (text_node->name, "Field")) {
+                                       gl_debug (DEBUG_XML, "->Line->Field node");
                                        node_text = g_new0 (glTextNode, 1);
                                        node_text->field_flag = TRUE;
                                        node_text->data =
@@ -245,10 +247,13 @@ xml04_parse_text_props (xmlNodePtr    object_node,
                                        nodes =
                                            g_list_append (nodes, node_text);
                                } else if (xmlNodeIsText (text_node)) {
+                                       gl_debug (DEBUG_XML, "->Line->\"literal\" node");
                                        node_text = g_new0 (glTextNode, 1);
                                        node_text->field_flag = FALSE;
                                        node_text->data =
                                            xmlNodeGetContent (text_node);
+                                       gl_debug (DEBUG_XML, "text = \"%s\"",
+                                                 node_text->data);
                                        nodes =
                                            g_list_append (nodes, node_text);
                                } else {