diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
| commit | aadfea4113abc6863d7ab03d21b973802c41c503 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/display/canvas-grid.cpp | |
| parent | Pot and Dutch translation update (diff) | |
| parent | A simple layout document as to what, why and how is cppification. (diff) | |
| download | inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip | |
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/display/canvas-grid.cpp')
| -rw-r--r-- | src/display/canvas-grid.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index 34c60b140..df73eb78e 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -3,6 +3,7 @@ */ /* Copyright (C) Johan Engelen 2006-2007 <johan@shouraizou.nl> * Copyright (C) Lauris Kaplinski 2000 + * Abhishek Sharma */ /* As a general comment, I am not exactly proud of how things are done. @@ -11,8 +12,6 @@ * Don't be shy to correct things. */ -#define INKSCAPE_CANVAS_GRID_C - #include "sp-canvas-util.h" #include "util/mathfns.h" #include "display-forward.h" @@ -33,6 +32,8 @@ #include "canvas-grid.h" #include "canvas-axonomgrid.h" +using Inkscape::DocumentUndo; + namespace Inkscape { static gchar const *const grid_name[] = { @@ -247,7 +248,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri // first create the child xml node, then hook it to repr. This order is important, to not set off listeners to repr before the new node is complete. - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); + Inkscape::XML::Document *xml_doc = doc->getReprDoc(); Inkscape::XML::Node *newnode; newnode = xml_doc->createElement("inkscape:grid"); newnode->setAttribute("type", getSVGName(gridtype)); @@ -255,7 +256,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri repr->appendChild(newnode); Inkscape::GC::release(newnode); - sp_document_done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); + DocumentUndo::done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); } /* |
