summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorEric Greveson <eric@greveson.co.uk>2013-07-01 20:04:32 +0000
committerEric Greveson <eric@greveson.co.uk>2013-07-01 20:04:32 +0000
commitc3a160589a9cb41c70a56e5e7b66a65857a0d10e (patch)
tree46860c161eda2e11687aff38141e04b40185798b /src/extension
parentCorrectly ignore symbolic link to ltmain.sh (diff)
downloadinkscape-c3a160589a9cb41c70a56e5e7b66a65857a0d10e.tar.gz
inkscape-c3a160589a9cb41c70a56e5e7b66a65857a0d10e.zip
Factored layer model out into new Inkscape::LayerModel class. This allows
Inkscape::Selection to use a LayerModel that is not associated with a UI. Changed the interface of verbs (SPAction) to use a new ActionContext rather than UI::View::View, again so that verbs may be used in a console mode. Modified boolean operation verbs to work in console-only mode. Fixed up DESKTOP_IS_ACTIVE macro to work in the case of no desktops. Modified main.cpp to process selections and verbs in no-GUI mode. Other changes are all consequences of the SPDesktop, Selection and LayerModel interface changes. (bzr r12387.1.1)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/dbus/document-interface.cpp5
-rw-r--r--src/extension/effect.cpp4
-rw-r--r--src/extension/effect.h2
-rw-r--r--src/extension/internal/bluredge.cpp5
-rw-r--r--[-rwxr-xr-x]src/extension/internal/filter/filter-all.cpp0
5 files changed, 9 insertions, 7 deletions
diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp
index 56d1dfdbd..bdf1fa98c 100644
--- a/src/extension/dbus/document-interface.cpp
+++ b/src/extension/dbus/document-interface.cpp
@@ -30,6 +30,7 @@
#include "extension/system.h" //IO
#include "file.h" //IO
#include "helper/action.h" //sp_action_perform
+#include "helper/action-context.h"
#include "inkscape.h" //inkscape_find_desktop_by_dkey, activate desktops
#include "layer-fns.h" //LPOS_BELOW
#include "live_effects/parameter/text.h" //text
@@ -263,7 +264,7 @@ dbus_call_verb (DocumentInterface *object, int verbid, GError **error)
if ( desk2 ) {
Inkscape::Verb *verb = Inkscape::Verb::get( verbid );
if ( verb ) {
- SPAction *action = verb->get_action(desk2);
+ SPAction *action = verb->get_action(Inkscape::ActionContext(desk2));
if ( action ) {
//if (!object->updates)
//document_interface_pause_updates (object, error);
@@ -342,7 +343,7 @@ document_interface_call_verb (DocumentInterface *object, gchar *verbid, GError *
if ( desk2 ) {
Inkscape::Verb *verb = Inkscape::Verb::getbyid( verbid );
if ( verb ) {
- SPAction *action = verb->get_action(desk2);
+ SPAction *action = verb->get_action(Inkscape::ActionContext(desk2));
if ( action ) {
sp_action_perform( action, NULL );
if (object->updates) {
diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp
index 1df8002ad..22c5e4989 100644
--- a/src/extension/effect.cpp
+++ b/src/extension/effect.cpp
@@ -359,9 +359,9 @@ Effect::set_pref_dialog (PrefDialog * prefdialog)
}
SPAction *
-Effect::EffectVerb::make_action (Inkscape::UI::View::View * view)
+Effect::EffectVerb::make_action (Inkscape::ActionContext const & context)
{
- return make_action_helper(view, &perform, static_cast<void *>(this));
+ return make_action_helper(context, &perform, static_cast<void *>(this));
}
/** \brief Decode the verb code and take appropriate action */
diff --git a/src/extension/effect.h b/src/extension/effect.h
index 193b90a97..a14cc6e7d 100644
--- a/src/extension/effect.h
+++ b/src/extension/effect.h
@@ -58,7 +58,7 @@ class Effect : public Extension {
/** \brief Name with elipses if that makes sense */
gchar * _elip_name;
protected:
- virtual SPAction * make_action (Inkscape::UI::View::View * view);
+ virtual SPAction * make_action (Inkscape::ActionContext const & context);
public:
/** \brief Use the Verb initializer with the same parameters. */
EffectVerb(gchar const * id,
diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp
index 8f1e07211..a3d2fd6e5 100644
--- a/src/extension/internal/bluredge.cpp
+++ b/src/extension/internal/bluredge.cpp
@@ -17,6 +17,7 @@
#include "document.h"
#include "selection.h"
#include "helper/action.h"
+#include "helper/action-context.h"
#include "preferences.h"
#include "path-chemistry.h"
#include "sp-item.h"
@@ -99,10 +100,10 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View
/* Doing an inset here folks */
offset *= -1.0;
prefs->setDoubleUnit("/options/defaultoffsetwidth/value", offset, "px");
- sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(desktop), NULL);
+ sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(Inkscape::ActionContext(desktop)), NULL);
} else if (offset > 0.0) {
prefs->setDoubleUnit("/options/defaultoffsetwidth/value", offset, "px");
- sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(desktop), NULL);
+ sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(Inkscape::ActionContext(desktop)), NULL);
}
selection->clear();
diff --git a/src/extension/internal/filter/filter-all.cpp b/src/extension/internal/filter/filter-all.cpp
index 0273d1669..0273d1669 100755..100644
--- a/src/extension/internal/filter/filter-all.cpp
+++ b/src/extension/internal/filter/filter-all.cpp