summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
commit1f2d8bc4ce99e970cead4ca96c1859c383a9c043 (patch)
tree07731605bc486145ce5817c5f98a27b0136c7074 /src/sp-object.cpp
parentMinor pass of header cleanup (diff)
downloadinkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.tar.gz
inkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.zip
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
(bzr r13341.1.190)
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 65228ec0a..fcff43aa5 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -1406,12 +1406,12 @@ bool SPObject::setDesc(gchar const *desc, bool verbatim)
return setTitleOrDesc(desc, "svg:desc", verbatim);
}
-gchar * SPObject::getTitleOrDesc(gchar const *svg_tagname) const
+char * SPObject::getTitleOrDesc(gchar const *svg_tagname) const
{
- gchar *result = 0;
+ char *result = NULL;
SPObject *elem = findFirstChild(svg_tagname);
if ( elem ) {
- result = g_string_free(elem->textualContent(), FALSE);
+ result = elem->textualContent();
}
return result;
}
@@ -1493,7 +1493,7 @@ SPObject * SPObject::findFirstChild(gchar const *tagname) const
return NULL;
}
-GString * SPObject::textualContent() const
+char* SPObject::textualContent() const
{
GString* text = g_string_new("");
@@ -1502,15 +1502,15 @@ GString * SPObject::textualContent() const
Inkscape::XML::NodeType child_type = child->repr->type();
if (child_type == Inkscape::XML::ELEMENT_NODE) {
- GString * new_text = child->textualContent();
- g_string_append(text, new_text->str);
- g_string_free(new_text, TRUE);
+ char* new_string = child->textualContent();
+ g_string_append(text, new_string);
+ g_free(new_string);
}
else if (child_type == Inkscape::XML::TEXT_NODE) {
g_string_append(text, child->repr->content());
}
}
- return text;
+ return g_string_free(text, FALSE);
}
/*