diff --git a/src/prefs-utils.cpp b/src/prefs-utils.cpp
index b2b3efeb7080c8c5a5d95cf215befd873f8178bc..7a950c3c3c60a54bff5dfbe76e1aa95301c5281e 100644 (file)
--- a/src/prefs-utils.cpp
+++ b/src/prefs-utils.cpp
Inkscape::XML::Node *father = inkscape_get_repr(INKSCAPE, father_path);
if (! father ) return NULL;
Inkscape::XML::Node *repr = father->document()->createElement("group");
- sp_repr_set_attr(repr, "id", child);
+ repr->setAttribute("id", child, false);
father->appendChild(repr);
return g_strdup_printf("%s.%s", father_path,child);
}
-/**
-\brief gets the list of children from a pref. Please free all that stuff after use.
-*/
-bool get_pref_children(gchar const *father_path, GSList ** children){
- Inkscape::XML::Node *father = inkscape_get_repr(INKSCAPE, father_path);
- if (! father ) return false;
- Inkscape::XML::Node *child_repr = sp_repr_children(father);
- while (child_repr) {
- *children = g_slist_prepend(*children, g_strdup_printf("%s.%s",father_path,child_repr->attribute("id")));
- child_repr = sp_repr_next(child_repr);
- }
-}
/**
\brief gets the nth children of a pref, starting from one (first child <=> n=1). returns NULL if out of bounds or father does not exist. Please free all that stuff after use.
*/
{
Inkscape::XML::Node *repr = inkscape_get_repr(INKSCAPE, path);
if (repr) {
- return (char *) repr->attribute(attr);
+ return repr->attribute(attr);
}
return NULL;
}