summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-12-21 15:39:39 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-12-21 15:39:39 +0000
commit30b6a43219b66aba1a9ebade8aca50910f2c25cc (patch)
treea34e3ffe54acd7ea8ff80b808c5995d71e255dae /src/extension
parentAdd arrow that demonstates 'auto-start-reverse' and 'context-stroke'/'context... (diff)
downloadinkscape-30b6a43219b66aba1a9ebade8aca50910f2c25cc.tar.gz
inkscape-30b6a43219b66aba1a9ebade8aca50910f2c25cc.zip
Deprecate and remove sp_desktop_selection in favor of SPDesktop::getSelection
(bzr r13809)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/execution-env.cpp4
-rw-r--r--src/extension/implementation/implementation.cpp4
-rw-r--r--src/extension/implementation/script.cpp2
-rw-r--r--src/extension/internal/bitmap/imagemagick.cpp4
-rw-r--r--src/extension/internal/grid.cpp4
5 files changed, 11 insertions, 7 deletions
diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp
index d4b5fd187..1495b7603 100644
--- a/src/extension/execution-env.cpp
+++ b/src/extension/execution-env.cpp
@@ -65,7 +65,7 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Imp
if (desktop != NULL) {
Inkscape::Util::GSListConstIterator<SPItem *> selected =
- sp_desktop_selection(desktop)->itemList();
+ desktop->getSelection()->itemList();
while ( selected != NULL ) {
Glib::ustring selected_id;
selected_id = (*selected)->getId();
@@ -200,7 +200,7 @@ ExecutionEnv::reselect (void) {
if (desktop == NULL) { return; }
- Inkscape::Selection * selection = sp_desktop_selection(desktop);
+ Inkscape::Selection * selection = desktop->getSelection();
for (std::list<Glib::ustring>::iterator i = _selected.begin(); i != _selected.end(); ++i) {
SPObject * obj = doc->getObjectById(i->c_str());
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index 6f6bddb93..e29aed308 100644
--- a/src/extension/implementation/implementation.cpp
+++ b/src/extension/implementation/implementation.cpp
@@ -48,8 +48,8 @@ Gtk::Widget *Implementation::prefs_effect(Inkscape::Extension::Effect *module, I
SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
- GSListConstIterator<SPItem *> selected =
- sp_desktop_selection((SPDesktop *)view)->itemList();
+ // FIXME very unsafe cast
+ GSListConstIterator<SPItem *> selected = ((SPDesktop *)view)->getSelection()->itemList();
Inkscape::XML::Node const* first_select = NULL;
if (selected != NULL) {
const SPItem * item = *selected;
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index e6ac13cdc..6b1abe04c 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -690,7 +690,7 @@ void Script::effect(Inkscape::Extension::Effect *module,
}
Inkscape::Util::GSListConstIterator<SPItem *> selected =
- sp_desktop_selection(desktop)->itemList(); //desktop should not be NULL since doc was checked and desktop is a casted pointer
+ desktop->getSelection()->itemList(); //desktop should not be NULL since doc was checked and desktop is a casted pointer
while ( selected != NULL ) {
Glib::ustring selected_id;
selected_id += "--id=";
diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp
index 0d47240d4..c92264858 100644
--- a/src/extension/internal/bitmap/imagemagick.cpp
+++ b/src/extension/internal/bitmap/imagemagick.cpp
@@ -242,7 +242,9 @@ ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::Vie
SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
- GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
+
+ // FIXME very unsafe cast
+ GSListConstIterator<SPItem *> selected = ((SPDesktop *)view)->getSelection()->itemList();
Inkscape::XML::Node * first_select = NULL;
if (selected != NULL) {
first_select = (*selected)->getRepr();
diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp
index f4e0e5843..2ce86c245 100644
--- a/src/extension/internal/grid.cpp
+++ b/src/extension/internal/grid.cpp
@@ -191,7 +191,9 @@ Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View
SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
- GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
+
+ // FIXME very unsafe cast
+ GSListConstIterator<SPItem *> selected = ((SPDesktop *)view)->getSelection()->itemList();
Inkscape::XML::Node * first_select = NULL;
if (selected != NULL) {
first_select = (*selected)->getRepr();