void sp_guide_remove (SPGuide * guide) { g_assert (SP_IS_GUIDE (guide)); sp_repr_unparent (SP_OBJECT (guide)->repr); }
bool Effect::check (void) { if (!Extension::check()) { /** \todo Check to see if parent has this as its only child, if so, delete it too */ if (_menu_node != NULL) sp_repr_unparent(_menu_node); _menu_node = NULL; return false; } return true; }
/** * Clears the gradient's svg:stop children from its repr. */ void sp_gradient_repr_clear_vector(SPGradient *gr) { Inkscape::XML::Node *repr = gr->getRepr(); /* Collect stops from original repr */ GSList *sl = NULL; for (Inkscape::XML::Node *child = repr->firstChild() ; child != NULL; child = child->next() ) { if (!strcmp(child->name(), "svg:stop")) { sl = g_slist_prepend(sl, child); } } /* Remove all stops */ while (sl) { /** \todo * fixme: This should work, unless we make gradient * into generic group. */ sp_repr_unparent((Inkscape::XML::Node *)sl->data); sl = g_slist_remove(sl, sl->data); } }