summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/spiral-tool.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:13:01 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:13:01 +0000
commit0d3d7f676b29f9d9a9cd53f08ced76e6588b856a (patch)
tree12a2646048750e49e7edee42046b8aa138207f2c /src/ui/tools/spiral-tool.cpp
parentwarping into a layer (diff)
parentReplace sp_style_xxx functions with SPStyle member functions. (diff)
downloadinkscape-0d3d7f676b29f9d9a9cd53f08ced76e6588b856a.tar.gz
inkscape-0d3d7f676b29f9d9a9cd53f08ced76e6588b856a.zip
update to trunk
(bzr r13682.1.22)
Diffstat (limited to 'src/ui/tools/spiral-tool.cpp')
-rw-r--r--src/ui/tools/spiral-tool.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/tools/spiral-tool.cpp b/src/ui/tools/spiral-tool.cpp
index 18c3e4e2d..f208e1c43 100644
--- a/src/ui/tools/spiral-tool.cpp
+++ b/src/ui/tools/spiral-tool.cpp
@@ -27,7 +27,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"
@@ -117,12 +117,12 @@ void SpiralTool::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();
this->sel_changed_connection = selection->connectChanged(sigc::mem_fun(this, &SpiralTool::selection_changed));
@@ -154,7 +154,7 @@ bool SpiralTool::root_handler(GdkEvent* event) {
static gboolean 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);
@@ -395,7 +395,7 @@ void SpiralTool::drag(Geom::Point const &p, guint state) {
/* status text */
Inkscape::Util::Quantity q = Inkscape::Util::Quantity(rad, "px");
- GString *rads = g_string_new(q.string(desktop->namedview->doc_units).c_str());
+ GString *rads = g_string_new(q.string(desktop->namedview->display_units).c_str());
this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE,
_("<b>Spiral</b>: radius %s, angle %5g&#176;; with <b>Ctrl</b> to snap angle"),
rads->str, sp_round((arg + 2.0*M_PI*this->spiral->revo)*180/M_PI, 0.0001));
@@ -417,15 +417,15 @@ void SpiralTool::finishItem() {
this->desktop->canvas->endForcedFullRedraws();
- sp_desktop_selection(this->desktop)->set(this->spiral);
- DocumentUndo::done(sp_desktop_document(this->desktop), SP_VERB_CONTEXT_SPIRAL, _("Create spiral"));
+ this->desktop->getSelection()->set(this->spiral);
+ DocumentUndo::done(this->desktop->getDocument(), SP_VERB_CONTEXT_SPIRAL, _("Create spiral"));
this->spiral = NULL;
}
}
void SpiralTool::cancel() {
- sp_desktop_selection(this->desktop)->clear();
+ this->desktop->getSelection()->clear();
sp_canvas_item_ungrab(SP_CANVAS_ITEM(this->desktop->acetate), 0);
if (this->spiral != NULL) {
@@ -440,7 +440,7 @@ void SpiralTool::cancel() {
this->desktop->canvas->endForcedFullRedraws();
- DocumentUndo::cancel(sp_desktop_document(this->desktop));
+ DocumentUndo::cancel(this->desktop->getDocument());
}
}