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/ui/tools/star-tool.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/tools/star-tool.cpp') diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index b5544d263..a5e46e5b7 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -127,12 +127,12 @@ void StarTool::setup() { this->shape_editor = new ShapeEditor(this->desktop); - SPItem *item = sp_desktop_selection(this->desktop)->singleItem(); + SPItem *item = this->desktop->getSelection()->singleItem(); if (item) { this->shape_editor->set_item(item); } - Inkscape::Selection *selection = sp_desktop_selection(this->desktop); + Inkscape::Selection *selection = this->desktop->getSelection(); this->sel_changed_connection.disconnect(); @@ -168,7 +168,7 @@ bool StarTool::root_handler(GdkEvent* event) { static bool dragging; SPDesktop *desktop = this->desktop; - Inkscape::Selection *selection = sp_desktop_selection (desktop); + Inkscape::Selection *selection = desktop->getSelection(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); this->tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100); @@ -441,7 +441,7 @@ void StarTool::finishItem() { desktop->canvas->endForcedFullRedraws(); - sp_desktop_selection(desktop)->set(this->star); + desktop->getSelection()->set(this->star); DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, _("Create star")); @@ -450,7 +450,7 @@ void StarTool::finishItem() { } void StarTool::cancel() { - sp_desktop_selection(desktop)->clear(); + desktop->getSelection()->clear(); sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0); if (this->star != NULL) { -- 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/ui/tools/star-tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/tools/star-tool.cpp') diff --git a/src/ui/tools/star-tool.cpp b/src/ui/tools/star-tool.cpp index a5e46e5b7..df311f2d8 100644 --- a/src/ui/tools/star-tool.cpp +++ b/src/ui/tools/star-tool.cpp @@ -30,7 +30,7 @@ #include "document-undo.h" #include "sp-namedview.h" #include "selection.h" -#include "desktop-handles.h" + #include "snap.h" #include "desktop.h" #include "desktop-style.h" @@ -442,7 +442,7 @@ void StarTool::finishItem() { desktop->canvas->endForcedFullRedraws(); desktop->getSelection()->set(this->star); - DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_STAR, _("Create star")); this->star = NULL; @@ -465,7 +465,7 @@ void StarTool::cancel() { desktop->canvas->endForcedFullRedraws(); - DocumentUndo::cancel(sp_desktop_document(desktop)); + DocumentUndo::cancel(desktop->getDocument()); } } -- cgit v1.2.3