diff options
| author | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-06-29 18:05:42 +0000 |
|---|---|---|
| committer | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-06-29 18:05:42 +0000 |
| commit | 8867de5daf309e4cdd3fce177b408618490be4f3 (patch) | |
| tree | 19a528d472e7a63f9cab97daa5c979d977db821b /src/ui/dialog/filedialogimpl-gtkmm.cpp | |
| parent | minor fix in Dutch translation of win32 installer (diff) | |
| download | inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.tar.gz inkscape-8867de5daf309e4cdd3fce177b408618490be4f3.zip | |
This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options].
(bzr r9546.1.1)
Diffstat (limited to 'src/ui/dialog/filedialogimpl-gtkmm.cpp')
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index 6f83a706f..eb2d33eee 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -123,9 +123,9 @@ findExpanderWidgets(Gtk::Container *parent, bool SVGPreview::setDocument(SPDocument *doc) { if (document) - sp_document_unref(document); + document->doUnref(); - sp_document_ref(doc); + doc->doRef(); document = doc; //This should remove it from the box, and free resources @@ -151,7 +151,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName) * I don't know why passing false to keepalive is bad. But it * prevents the display of an svg with a non-ascii filename */ - SPDocument *doc = sp_document_new (fileName.c_str(), true); + SPDocument *doc = SPDocument::createDoc (fileName.c_str(), true); if (!doc) { g_warning("SVGView: error loading document '%s'\n", fileName.c_str()); return false; @@ -159,7 +159,7 @@ bool SVGPreview::setFileName(Glib::ustring &theFileName) setDocument(doc); - sp_document_unref(doc); + doc->doUnref(); return true; } @@ -172,7 +172,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer) return false; gint len = (gint)strlen(xmlBuffer); - SPDocument *doc = sp_document_new_from_mem(xmlBuffer, len, 0); + SPDocument *doc = SPDocument::createDocFromMem(xmlBuffer, len, 0); if (!doc) { g_warning("SVGView: error loading buffer '%s'\n",xmlBuffer); return false; @@ -180,7 +180,7 @@ bool SVGPreview::setFromMem(char const *xmlBuffer) setDocument(doc); - sp_document_unref(doc); + doc->doUnref(); Inkscape::GC::request_early_collection(); |
