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/dialog/transformation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui/dialog/transformation.cpp') diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 2c6692777..1dba31e5a 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -25,6 +25,7 @@ #include "document.h" #include "document-undo.h" +#include "desktop.h" #include "desktop-handles.h" #include "transformation.h" #include "align-and-distribute.h" @@ -578,7 +579,7 @@ void Transformation::onSwitchPage(Gtk::Widget * /*page*/, guint pagenum) void Transformation::onSwitchPage(GtkNotebookPage * /*page*/, guint pagenum) #endif { - updateSelection((PageType)pagenum, sp_desktop_selection(getDesktop())); + updateSelection((PageType)pagenum, getDesktop()->getSelection()); } -- cgit v1.2.3 From 6c78ab7deeea3b32791437ade35e8911e7c73c8e Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Dec 2014 14:58:38 -0500 Subject: Purge sp_desktop_namedview in favor of SPDesktop::getNamedView (bzr r13810) --- src/ui/dialog/transformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/dialog/transformation.cpp') diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 1dba31e5a..924aa129b 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -206,7 +206,7 @@ void Transformation::layoutPageMove() // Setting default unit to document unit SPDesktop *dt = getDesktop(); - SPNamedView *nv = sp_desktop_namedview(dt); + SPNamedView *nv = dt->getNamedView(); if (nv->display_units) { _units_move.setUnit(nv->display_units->abbr); } -- cgit v1.2.3 From 2135fdee3aeff1dd82d11f191a7295990cd60cb5 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Dec 2014 16:01:01 -0500 Subject: Purge sp_desktop_message_stack (bzr r13817) --- src/ui/dialog/transformation.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ui/dialog/transformation.cpp') diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index 924aa129b..d7cca13a8 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -904,7 +904,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) double skewX = _scalar_skew_horizontal.getValue("%"); double skewY = _scalar_skew_vertical.getValue("%"); if (fabs(0.01*skewX*0.01*skewY - 1.0) < Geom::EPSILON) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } sp_item_skew_rel (item, 0.01*skewX, 0.01*skewY); @@ -915,7 +915,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) || (fabs(angleX - angleY - M_PI/2) < Geom::EPSILON) || (fabs((angleX - angleY)/3 + M_PI/2) < Geom::EPSILON) || (fabs((angleX - angleY)/3 - M_PI/2) < Geom::EPSILON)) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } double skewX = tan(-angleX); @@ -929,7 +929,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) double width = bbox->dimensions()[Geom::X]; double height = bbox->dimensions()[Geom::Y]; if (fabs(skewX*skewY - width*height) < Geom::EPSILON) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } sp_item_skew_rel (item, skewX/height, skewY/width); @@ -948,7 +948,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) double skewX = _scalar_skew_horizontal.getValue("%"); double skewY = _scalar_skew_vertical.getValue("%"); if (fabs(0.01*skewX*0.01*skewY - 1.0) < Geom::EPSILON) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } sp_selection_skew_relative(selection, *center, 0.01*skewX, 0.01*skewY); @@ -959,7 +959,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) || (fabs(angleX - angleY - M_PI/2) < Geom::EPSILON) || (fabs((angleX - angleY)/3 + M_PI/2) < Geom::EPSILON) || (fabs((angleX - angleY)/3 - M_PI/2) < Geom::EPSILON)) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } double skewX = tan(-angleX); @@ -969,7 +969,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) double skewX = _scalar_skew_horizontal.getValue("px"); double skewY = _scalar_skew_vertical.getValue("px"); if (fabs(skewX*skewY - width*height) < Geom::EPSILON) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } sp_selection_skew_relative(selection, *center, skewX/height, skewY/width); @@ -993,7 +993,7 @@ void Transformation::applyPageTransform(Inkscape::Selection *selection) Geom::Affine displayed(a, b, c, d, e, f); if (displayed.isSingular()) { - sp_desktop_message_stack(getDesktop())->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); + getDesktop()->getMessageStack()->flash(Inkscape::WARNING_MESSAGE, _("Transform matrix is singular, not used.")); return; } -- 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/dialog/transformation.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui/dialog/transformation.cpp') diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index d7cca13a8..233d99750 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -26,7 +26,7 @@ #include "document.h" #include "document-undo.h" #include "desktop.h" -#include "desktop-handles.h" + #include "transformation.h" #include "align-and-distribute.h" #include "inkscape.h" @@ -802,7 +802,7 @@ void Transformation::applyPageMove(Inkscape::Selection *selection) } } - DocumentUndo::done( sp_desktop_document(selection->desktop()) , SP_VERB_DIALOG_TRANSFORM, + DocumentUndo::done( selection->desktop()->getDocument() , SP_VERB_DIALOG_TRANSFORM, _("Move")); } @@ -864,7 +864,7 @@ void Transformation::applyPageScale(Inkscape::Selection *selection) } } - DocumentUndo::done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, + DocumentUndo::done(selection->desktop()->getDocument(), SP_VERB_DIALOG_TRANSFORM, _("Scale")); } @@ -889,7 +889,7 @@ void Transformation::applyPageRotate(Inkscape::Selection *selection) } } - DocumentUndo::done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, + DocumentUndo::done(selection->desktop()->getDocument(), SP_VERB_DIALOG_TRANSFORM, _("Rotate")); } @@ -977,7 +977,7 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) } } - DocumentUndo::done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, + DocumentUndo::done(selection->desktop()->getDocument(), SP_VERB_DIALOG_TRANSFORM, _("Skew")); } @@ -1007,7 +1007,7 @@ void Transformation::applyPageTransform(Inkscape::Selection *selection) sp_selection_apply_affine(selection, displayed); // post-multiply each object's transform } - DocumentUndo::done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM, + DocumentUndo::done(selection->desktop()->getDocument(), SP_VERB_DIALOG_TRANSFORM, _("Edit transformation matrix")); } -- cgit v1.2.3