diff options
| author | Eric Greveson <eric@greveson.co.uk> | 2013-07-03 19:06:11 +0000 |
|---|---|---|
| committer | Eric Greveson <eric@greveson.co.uk> | 2013-07-03 19:06:11 +0000 |
| commit | 09ce234c1fc367a2607936e6cf106cb24c60e94f (patch) | |
| tree | 72712240ad3e4782ef9c7e07ea44486dd4de77f6 /src/helper/action-context.cpp | |
| parent | Added error messages when attempting to use verbs requiring GUI in (diff) | |
| download | inkscape-09ce234c1fc367a2607936e6cf106cb24c60e94f.tar.gz inkscape-09ce234c1fc367a2607936e6cf106cb24c60e94f.zip | |
Modified dbus interface so that it works in console mode (--dbus-listen)
Modified action context setup so that in console mode, when a document is
added to the main inkscape app instance, it gets a selection model and
layer model automatically set up for it
Made a couple more verbs work in console mode
(bzr r12387.1.4)
Diffstat (limited to '')
| -rw-r--r-- | src/helper/action-context.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/helper/action-context.cpp b/src/helper/action-context.cpp index c88086f7f..f211d775d 100644 --- a/src/helper/action-context.cpp +++ b/src/helper/action-context.cpp @@ -60,6 +60,16 @@ UI::View::View *ActionContext::getView() const return _view; } +SPDesktop *ActionContext::getDesktop() const +{ + // TODO: this slightly horrible storage of a UI::View::View*, and + // casting to an SPDesktop*, is only done because that's what was + // already the norm in the Inkscape codebase. This seems wrong. Surely + // we should store an SPDesktop* in the first place? Is there a case + // of actions being carried out on a View that is not an SPDesktop? + return static_cast<SPDesktop *>(_view); +} + } // namespace Inkscape /* |
