summaryrefslogtreecommitdiffstats
path: root/src/application/editor.cpp
diff options
context:
space:
mode:
authorAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
committerAbhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom>2010-06-29 18:05:42 +0000
commit8867de5daf309e4cdd3fce177b408618490be4f3 (patch)
tree19a528d472e7a63f9cab97daa5c979d977db821b /src/application/editor.cpp
parentminor fix in Dutch translation of win32 installer (diff)
downloadinkscape-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/application/editor.cpp')
-rw-r--r--src/application/editor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/application/editor.cpp b/src/application/editor.cpp
index 49010efdc..d2ccccbe3 100644
--- a/src/application/editor.cpp
+++ b/src/application/editor.cpp
@@ -76,10 +76,10 @@ Editor::init()
//
gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL);
bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR);
- SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true);
+ SPDocument *doc = SPDocument::createDoc (have_default? tmpl:0, true, true);
g_return_val_if_fail (doc != 0, false);
Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc);
- sp_document_unref (doc);
+ doc->doUnref ();
_window = ew->getWindow();
return ew != 0;
}
@@ -129,7 +129,7 @@ Editor::createDesktop (SPDocument* doc)
{
g_assert (doc != 0);
(new Inkscape::UI::View::EditWidget (doc))->present();
- sp_document_unref (doc);
+ doc->doUnref ();
SPDesktop *dt = getActiveDesktop();
reactivateDesktop (dt);
return dt;