From: gouldtj Date: Thu, 1 Mar 2007 07:13:50 +0000 (+0000) Subject: r14577@tres: ted | 2007-02-27 18:51:05 -0800 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=326274fb56d7bcef5cb09e74b7b9ece9c079e8cc;p=inkscape.git r14577@tres: ted | 2007-02-27 18:51:05 -0800 Filling in the list function to list all the verbs for the command line option --verb-list --- diff --git a/src/verbs.cpp b/src/verbs.cpp index 36884f37b..1627f42bf 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -2406,8 +2406,19 @@ Verb *Verb::_base_verbs[] = { void Verb::list (void) { - printf("Listing Verbs\n"); + // Go through the dynamic verb table + for (VerbTable::iterator iter = _verbs.begin(); iter != _verbs.end(); iter++) { + Verb * verb = iter->second; + if (verb->get_code() == SP_VERB_INVALID || + verb->get_code() == SP_VERB_NONE || + verb->get_code() == SP_VERB_LAST) { + continue; + } + + printf("\"%s\", \"%s\"\n", verb->get_id(), verb->get_name()); + } + return; }; } /* namespace Inkscape */