From 1497d669b9d07989ca22ccac02424d4e0f4e8889 Mon Sep 17 00:00:00 2001 From: Aaron Spike Date: Mon, 22 Jan 2007 03:26:44 +0000 Subject: continue switching sp_repr_new* over to XML::Document::create* (bzr r2257) --- src/widgets/gradient-selector.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/widgets/gradient-selector.cpp') diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index 3177700c3..68d69f3f9 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -22,6 +22,7 @@ #include #include +#include "document.h" #include "../document-private.h" #include "../gradient-chemistry.h" @@ -312,14 +313,15 @@ sp_gradient_selector_add_vector_clicked (GtkWidget *w, SPGradientSelector *sel) if (gr) { repr = SP_OBJECT_REPR (gr)->duplicate(); } else { + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); Inkscape::XML::Node *stop; - repr = sp_repr_new ("svg:linearGradient"); - stop = sp_repr_new ("svg:stop"); + repr = xml_doc->createElement("svg:linearGradient"); + stop = xml_doc->createElement("svg:stop"); stop->setAttribute("offset", "0"); stop->setAttribute("style", "stop-color:#000;stop-opacity:1;"); repr->appendChild(stop); Inkscape::GC::release(stop); - stop = sp_repr_new ("svg:stop"); + stop = xml_doc->createElement("svg:stop"); stop->setAttribute("offset", "1"); stop->setAttribute("style", "stop-color:#fff;stop-opacity:1;"); repr->appendChild(stop); -- cgit v1.2.3