From 30b6a43219b66aba1a9ebade8aca50910f2c25cc Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Dec 2014 10:39:39 -0500 Subject: Deprecate and remove sp_desktop_selection in favor of SPDesktop::getSelection (bzr r13809) --- src/file.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/file.cpp') diff --git a/src/file.cpp b/src/file.cpp index a933a9611..d237e06c3 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -1086,7 +1086,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) } // Change the selection to the freshly pasted objects - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); selection->setReprList(pasted_objects); // Apply inverse of parent transform @@ -1221,7 +1221,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, // select and move the imported item if (new_obj && SP_IS_ITEM(new_obj)) { - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); selection->set(SP_ITEM(new_obj)); // preserve parent and viewBox transformations -- cgit v1.2.3 From 3dbf9a08680c6d7252c79397dbf12082ead61bd7 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Dec 2014 16:58:32 -0500 Subject: Remove sp_desktop_document and finish cleanup of desktop-handles.h (bzr r13820) --- src/file.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/file.cpp') diff --git a/src/file.cpp b/src/file.cpp index d237e06c3..72516d776 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -32,7 +32,7 @@ #include "ui/dialog/ocaldialogs.h" #include "desktop.h" -#include "desktop-handles.h" + #include "dir-util.h" #include "document-private.h" #include "document-undo.h" @@ -289,7 +289,7 @@ bool sp_file_open(const Glib::ustring &uri, if (doc) { - SPDocument *existing = desktop ? sp_desktop_document(desktop) : NULL; + SPDocument *existing = desktop ? desktop->getDocument() : NULL; if (existing && existing->virgin && replace_empty) { // If the current desktop is empty, open the document there @@ -348,7 +348,7 @@ void sp_file_revert_dialog() SPDesktop *desktop = SP_ACTIVE_DESKTOP; g_assert(desktop != NULL); - SPDocument *doc = sp_desktop_document(desktop); + SPDocument *doc = desktop->getDocument(); g_assert(doc != NULL); Inkscape::XML::Node *repr = doc->getReprRoot(); @@ -1055,7 +1055,7 @@ void sp_import_document(SPDesktop *desktop, SPDocument *clipdoc, bool in_place) { //TODO: merge with file_import() - SPDocument *target_document = sp_desktop_document(desktop); + SPDocument *target_document = desktop->getDocument(); Inkscape::XML::Node *root = clipdoc->getReprRoot(); Inkscape::XML::Node *target_parent = desktop->currentLayer()->getRepr(); @@ -1232,7 +1232,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, // move to mouse pointer { - sp_desktop_document(desktop)->ensureUpToDate(); + desktop->getDocument()->ensureUpToDate(); Geom::OptRect sel_bbox = selection->visualBounds(); if (sel_bbox) { Geom::Point m( desktop->point() - sel_bbox->midpoint() ); -- cgit v1.2.3