From 8867de5daf309e4cdd3fce177b408618490be4f3 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Tue, 29 Jun 2010 23:35:42 +0530 Subject: 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) --- src/ui/dialog/aboutbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/dialog/aboutbox.cpp') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 8d467d53f..7ed00ad19 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -147,7 +147,7 @@ Gtk::Widget *build_splash_widget() { // should be in UTF-*8.. char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL); - SPDocument *doc=sp_document_new (about, TRUE); + SPDocument *doc=SPDocument::createDoc (about, TRUE); g_free(about); g_return_val_if_fail(doc != NULL, NULL); @@ -162,7 +162,7 @@ Gtk::Widget *build_splash_widget() { double width=sp_document_width(doc); double height=sp_document_height(doc); - sp_document_unref(doc); + doc->doUnref(); sp_svg_view_widget_set_resize(SP_SVG_VIEW_WIDGET(v), FALSE, (int)width, (int)height); -- cgit v1.2.3 From 121815791be2d24cb745663520b111ee914fbc09 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Thu, 1 Jul 2010 15:36:56 +0530 Subject: C++fied SPDocument added (bzr r9546.1.2) --- src/ui/dialog/aboutbox.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/dialog/aboutbox.cpp') diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 7ed00ad19..8c102b57f 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -147,7 +147,7 @@ Gtk::Widget *build_splash_widget() { // should be in UTF-*8.. char *about=g_build_filename(INKSCAPE_SCREENSDIR, _("about.svg"), NULL); - SPDocument *doc=SPDocument::createDoc (about, TRUE); + SPDocument *doc=SPDocument::createNewDoc (about, TRUE); g_free(about); g_return_val_if_fail(doc != NULL, NULL); @@ -155,12 +155,12 @@ Gtk::Widget *build_splash_widget() { if ( version && SP_IS_TEXT(version) ) { sp_te_set_repr_text_multiline (SP_TEXT (version), Inkscape::version_string); } - sp_document_ensure_up_to_date(doc); + doc->ensure_up_to_date(); GtkWidget *v=sp_svg_view_widget_new(doc); - double width=sp_document_width(doc); - double height=sp_document_height(doc); + double width=doc->getWidth(); + double height=doc->getHeight(); doc->doUnref(); -- cgit v1.2.3