From c3a160589a9cb41c70a56e5e7b66a65857a0d10e Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Mon, 1 Jul 2013 21:04:32 +0100 Subject: 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) --- src/extension/dbus/document-interface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/extension/dbus/document-interface.cpp') 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) { -- cgit v1.2.3