From 06f90c27b6e17397b03f20fe92fd0fb31d55332c Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Thu, 29 Sep 2016 23:08:29 +0700 Subject: allow to use verbs as xverbs (bzr r15136.1.8) --- src/main-cmdlinexact.cpp | 7 ++++++- src/verbs.h | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main-cmdlinexact.cpp b/src/main-cmdlinexact.cpp index ddf8a73eb..a3c9436bd 100644 --- a/src/main-cmdlinexact.cpp +++ b/src/main-cmdlinexact.cpp @@ -517,8 +517,13 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { ++undo_counter; new CmdLineAction(true, verb.args[0].c_str()); } + else if( Verb::getbyid(verb.args[0].c_str()) != NULL ) + { + ++undo_counter; + new CmdLineAction(true, verb.args[0].c_str()); + } else { - printf("Unhadled verb %s\n", verb.args[0].c_str()); + printf("Unhadled xverb %s\n", verb.args[0].c_str()); fflush(stdout); } } diff --git a/src/verbs.h b/src/verbs.h index e9ae10ba5..a273fe76e 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -553,7 +553,7 @@ public: SPAction * get_action(Inkscape::ActionContext const & context); private: - static Verb * get_search (unsigned int code, bool verbose = true); + static Verb * get_search (unsigned int code); public: /** @@ -575,7 +575,7 @@ public: return get_search(code); } } - static Verb * getbyid (gchar const * id); + static Verb * getbyid (gchar const * id, bool verbose = true); /** * Print a message to stderr indicating that this verb needs a GUI to run -- cgit v1.2.3