From 9f666963e7f574c95d26082597e7ee5fbee9780b Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 19 Nov 2018 23:49:18 +0100 Subject: Allow any valid Verb to be used in "--actions". Rename "select" action to "select-via-id". Add "select-via-class", "select-via-element", "select-via-selector", and "select-clear" actions. --- src/inkscape-application.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/inkscape-application.cpp') diff --git a/src/inkscape-application.cpp b/src/inkscape-application.cpp index 93133a214..e99f7071c 100644 --- a/src/inkscape-application.cpp +++ b/src/inkscape-application.cpp @@ -20,7 +20,9 @@ #include "file.h" // File open and window creation. #include "io/file.h" // File open (command line). #include "desktop.h" // Access to window -#include "actions/actions-base.h" // Actions + +#include "actions/actions-base.h" // Actions +#include "actions/actions-selection.h" // Actions #ifdef WITH_DBUS # include "extension/dbus/dbus-init.h" @@ -59,6 +61,7 @@ InkscapeApplication::InkscapeApplication() // ======================== Actions ========================= add_actions_base(this); // actions that are GUI independent + add_actions_selection(this); // actions for object selection // ====================== Command Line ====================== @@ -363,7 +366,6 @@ InkscapeApplication::on_handle_local_options(const Glib::RefPtr tokens = Glib::Regex::split_simple("\\s*;\\s*", actions); for (auto token : tokens) { - std::cout << token << std::endl; std::vector tokens2 = Glib::Regex::split_simple("\\s*:\\s*", token); std::string action; std::string value; @@ -399,8 +401,11 @@ InkscapeApplication::on_handle_local_options(const Glib::RefPtr::create(action))); } } } @@ -435,7 +440,7 @@ InkscapeApplication::on_handle_local_options(const Glib::RefPtrlookup_value("query-id", query_id); if (!query_id.empty()) { _command_line_actions.push_back( - std::make_pair("query-id", Glib::Variant::create(query_id))); + std::make_pair("select-via-id", Glib::Variant::create(query_id))); } } -- cgit v1.2.3