diff options
| author | Dmitry Zhulanov <dmitry.zhulanov@gmail.com> | 2016-10-01 06:05:10 +0000 |
|---|---|---|
| committer | Dmitry Zhulanov <dmitry.zhulanov@gmail.com> | 2016-10-01 06:05:10 +0000 |
| commit | 81364db0bc98b01319dc5ecb835a4e37b906bad2 (patch) | |
| tree | 405d5268db023f160154240d074f4ba4f5d60136 /src/main-cmdlinexact.cpp | |
| parent | allow to use verbs as xverbs (diff) | |
| download | inkscape-81364db0bc98b01319dc5ecb835a4e37b906bad2.tar.gz inkscape-81364db0bc98b01319dc5ecb835a4e37b906bad2.zip | |
disable xverb feature if WITH_YAML defined
(bzr r15136.1.9)
Diffstat (limited to 'src/main-cmdlinexact.cpp')
| -rw-r--r-- | src/main-cmdlinexact.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main-cmdlinexact.cpp b/src/main-cmdlinexact.cpp index a3c9436bd..3dc83bc8f 100644 --- a/src/main-cmdlinexact.cpp +++ b/src/main-cmdlinexact.cpp @@ -52,7 +52,10 @@ #include <glibmm/i18n.h> #include "main-cmdlinexact.h" +#ifdef WITH_YAML #include "yaml.h" +#endif // WITH_YAML + #include "extension/system.h" #include "file.h" #include <glib.h> @@ -312,6 +315,9 @@ typedef std::list<verb_info_t> verbs_list_t; void CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { +#ifndef WITH_YAML + return; +#else // WITH_YAML FILE *fh = fopen(yaml_filename, "r"); if(fh == NULL) { printf("Failed to open file!\n"); @@ -409,7 +415,7 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { verb_info_t verb; verb.xverb = true; verb.args = vectorFromString((char *)token.data.scalar.value); - if ((verb.args.size() > 1) && Verb::getbyid((char *)token.data.scalar.value)) + if ((verb.args.size() > 1) && Verb::getbyid((char *)token.data.scalar.value, false)) verb.xverb = false; verbs_list.push_back(verb); } @@ -529,7 +535,7 @@ CmdLineXAction::createActionsFromYAML( gchar const *yaml_filename ) { } fflush(stdout); - return; +#endif // WITH_YAML } |
