summaryrefslogtreecommitdiffstats
path: root/src/verbs.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2007-03-01 07:13:50 +0000
committergouldtj <gouldtj@users.sourceforge.net>2007-03-01 07:13:50 +0000
commit0a6a71d65e99b4bfd9f466bf122afe3d992f5b61 (patch)
tree6058596529708393e707dd8fc3f3560829377dba /src/verbs.cpp
parentr14576@tres: ted | 2007-02-26 23:29:13 -0800 (diff)
downloadinkscape-0a6a71d65e99b4bfd9f466bf122afe3d992f5b61.tar.gz
inkscape-0a6a71d65e99b4bfd9f466bf122afe3d992f5b61.zip
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 (bzr r2474)
Diffstat (limited to 'src/verbs.cpp')
-rw-r--r--src/verbs.cpp13
1 files changed, 12 insertions, 1 deletions
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 */