summaryrefslogtreecommitdiffstats
path: root/src/extension/implementation
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-01-03 12:23:35 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-01-03 12:23:35 +0000
commitfde59b9691f02d4f33a9b327b0e0fac770109854 (patch)
treeee2438781f41cbc434c230bee3dbad3c28822058 /src/extension/implementation
parentA few GSEAL issues in device-manager (diff)
downloadinkscape-fde59b9691f02d4f33a9b327b0e0fac770109854.tar.gz
inkscape-fde59b9691f02d4f33a9b327b0e0fac770109854.zip
Janitorial tasks: get rid of deprecated repr wrapper functions
(bzr r10830)
Diffstat (limited to 'src/extension/implementation')
-rw-r--r--src/extension/implementation/script.cpp24
-rw-r--r--src/extension/implementation/xslt.cpp14
2 files changed, 19 insertions, 19 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index 0a0282284..af401ecde 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -184,7 +184,7 @@ std::string Script::solve_reldir(Inkscape::XML::Node *reprin) {
// right now the only recognized relative directory is "extensions"
if (!s || Glib::ustring(s) != "extensions") {
- Glib::ustring str = sp_repr_children(reprin)->content();
+ Glib::ustring str = reprin->firstChild()->content();
return str;
}
@@ -195,7 +195,7 @@ std::string Script::solve_reldir(Inkscape::XML::Node *reprin) {
gchar * fname = g_build_filename(
Inkscape::Extension::Extension::search_path[i],
- sp_repr_children(reprin)->content(),
+ reprin->firstChild()->content(),
NULL);
Glib::ustring filename = fname;
g_free(fname);
@@ -308,10 +308,10 @@ bool Script::load(Inkscape::Extension::Extension *module)
helper_extension = "";
/* This should probably check to find the executable... */
- Inkscape::XML::Node *child_repr = sp_repr_children(module->get_repr());
+ Inkscape::XML::Node *child_repr = module->get_repr()->firstChild();
while (child_repr != NULL) {
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "script")) {
- child_repr = sp_repr_children(child_repr);
+ child_repr = child_repr->firstChild();
while (child_repr != NULL) {
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "command")) {
const gchar *interpretstr = child_repr->attribute("interpreter");
@@ -322,14 +322,14 @@ bool Script::load(Inkscape::Extension::Extension *module)
command.insert(command.end(), solve_reldir(child_repr));
}
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "helper_extension")) {
- helper_extension = sp_repr_children(child_repr)->content();
+ helper_extension = child_repr->firstChild()->content();
}
- child_repr = sp_repr_next(child_repr);
+ child_repr = child_repr->next();
}
break;
}
- child_repr = sp_repr_next(child_repr);
+ child_repr = child_repr->next();
}
//g_return_val_if_fail(command.length() > 0, false);
@@ -364,11 +364,11 @@ void Script::unload(Inkscape::Extension::Extension */*module*/)
bool Script::check(Inkscape::Extension::Extension *module)
{
int script_count = 0;
- Inkscape::XML::Node *child_repr = sp_repr_children(module->get_repr());
+ Inkscape::XML::Node *child_repr = module->get_repr()->firstChild();
while (child_repr != NULL) {
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "script")) {
script_count++;
- child_repr = sp_repr_children(child_repr);
+ child_repr = child_repr->firstChild();
while (child_repr != NULL) {
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "check")) {
std::string command_text = solve_reldir(child_repr);
@@ -384,18 +384,18 @@ bool Script::check(Inkscape::Extension::Extension *module)
}
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "helper_extension")) {
- gchar const *helper = sp_repr_children(child_repr)->content();
+ gchar const *helper = child_repr->firstChild()->content();
if (Inkscape::Extension::db.get(helper) == NULL) {
return false;
}
}
- child_repr = sp_repr_next(child_repr);
+ child_repr = child_repr->next();
}
break;
}
- child_repr = sp_repr_next(child_repr);
+ child_repr = child_repr->next();
}
if (script_count == 0) {
diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp
index 8b6e6c701..17ba739f8 100644
--- a/src/extension/implementation/xslt.cpp
+++ b/src/extension/implementation/xslt.cpp
@@ -59,7 +59,7 @@ XSLT::solve_reldir(Inkscape::XML::Node *reprin) {
gchar const *s = reprin->attribute("reldir");
if (!s) {
- Glib::ustring str = sp_repr_children(reprin)->content();
+ Glib::ustring str = reprin->firstChild()->content();
return str;
}
@@ -73,7 +73,7 @@ XSLT::solve_reldir(Inkscape::XML::Node *reprin) {
gchar * fname = g_build_filename(
Inkscape::Extension::Extension::search_path[i],
- sp_repr_children(reprin)->content(),
+ reprin->firstChild()->content(),
NULL);
Glib::ustring filename = fname;
g_free(fname);
@@ -83,7 +83,7 @@ XSLT::solve_reldir(Inkscape::XML::Node *reprin) {
}
} else {
- Glib::ustring str = sp_repr_children(reprin)->content();
+ Glib::ustring str = reprin->firstChild()->content();
return str;
}
@@ -106,20 +106,20 @@ XSLT::load(Inkscape::Extension::Extension *module)
{
if (module->loaded()) { return true; }
- Inkscape::XML::Node *child_repr = sp_repr_children(module->get_repr());
+ Inkscape::XML::Node *child_repr = module->get_repr()->firstChild();
while (child_repr != NULL) {
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "xslt")) {
- child_repr = sp_repr_children(child_repr);
+ child_repr = child_repr->firstChild();
while (child_repr != NULL) {
if (!strcmp(child_repr->name(), INKSCAPE_EXTENSION_NS "file")) {
_filename = solve_reldir(child_repr);
}
- child_repr = sp_repr_next(child_repr);
+ child_repr = child_repr->next();
}
break;
}
- child_repr = sp_repr_next(child_repr);
+ child_repr = child_repr->next();
}
_parsedDoc = xmlParseFile(_filename.c_str());