Did you attach the new_child to the_parent?
Yes, the complete code is: bool create_pref(gchar const *father_path, gchar const *child){ Inkscape::XML::Node *father = inkscape_get_repr(INKSCAPE, father_path); if (! father ) return false; Inkscape::XML::Node *repr = father->document()->createElement("group"); sp_repr_set_attr(repr, "id", child); repr->_setParent(father); return true; }
Another different topic, I need a way to be notified that a setting has been
changed from the toolbox. I such a signal existing somewhere ?
When I needed it, I just added a listener to the repr of the pref setting, and was notified whenever that setting is changed by no matter who. E.g. look into the tool style indicator (at the right end of control bars of object-creating tools).
The problem is that I do not want to be notified when the change comes from the profile, because I want tot change the combo to "No Preset" when the value is changed: If i do it this way, changing the preset will trigger the "change" value and reset the combo to no preset... So unless I mark somewhere (e.g. an ugly static flag) the change comes from the preset combo and check when I come back and do nothing in this case, I need to find another way.