diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-11-19 22:49:18 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2018-11-19 22:49:18 +0000 |
| commit | 9f666963e7f574c95d26082597e7ee5fbee9780b (patch) | |
| tree | 901e704d42fbcc2f98b2970bdbc7da25a72e0736 /src/inkscape-application.cpp | |
| parent | Fix --help descriptions of "--actions", "--query-id", " and "--export-id". (diff) | |
| download | inkscape-9f666963e7f574c95d26082597e7ee5fbee9780b.tar.gz inkscape-9f666963e7f574c95d26082597e7ee5fbee9780b.zip | |
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.
Diffstat (limited to 'src/inkscape-application.cpp')
| -rw-r--r-- | src/inkscape-application.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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<Glib::VariantDic // Split action list std::vector<Glib::ustring> tokens = Glib::Regex::split_simple("\\s*;\\s*", actions); for (auto token : tokens) { - std::cout << token << std::endl; std::vector<Glib::ustring> 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<Glib::VariantDic _command_line_actions.push_back( std::make_pair( action, Glib::VariantBase() ) ); } } else { + // Assume a verb std::cerr << "InkscapeApplication::on_handle_local_options: '" << action << "' is not a valid action!" << std::endl; + _command_line_actions.push_back( + std::make_pair("verb", Glib::Variant<Glib::ustring>::create(action))); } } } @@ -435,7 +440,7 @@ InkscapeApplication::on_handle_local_options(const Glib::RefPtr<Glib::VariantDic options->lookup_value("query-id", query_id); if (!query_id.empty()) { _command_line_actions.push_back( - std::make_pair("query-id", Glib::Variant<Glib::ustring>::create(query_id))); + std::make_pair("select-via-id", Glib::Variant<Glib::ustring>::create(query_id))); } } |
