From 3b257a6a2f81c677cab83111051a79c5c3d5307f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 21 Nov 2012 18:45:38 +0000 Subject: Move human name and port label options to main configuration. This makes it possible to persistently set the desired style in configuration files. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4843 a436a847-0d15-0410-975c-d299462d15a1 --- src/Configuration.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Configuration.cpp') diff --git a/src/Configuration.cpp b/src/Configuration.cpp index f3b59f3b..935b6796 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -58,6 +58,8 @@ Configuration::Configuration(Forge& forge) add("path", "path", 'L', "Target path for loaded graph", forge.String, Raul::Atom()); add("queueSize", "queue-size", 'q', "Event queue size", forge.Int, forge.make(4096)); add("run", "run", 'r', "Run script", forge.String, Raul::Atom()); + add("humanNames", "human-names", 0, "Show human names in GUI", forge.Bool, forge.make(true)); + add("portLabels", "port-labels", 0, "Show port labels in GUI", forge.Bool, forge.make(true)); } Configuration& @@ -118,6 +120,9 @@ Configuration::set_value_from_string(Configuration::Option& option, } else if (option.type == _forge.String) { option.value = _forge.alloc(value.c_str()); assert(option.value.type() == _forge.String); + } else if (option.type == _forge.Bool) { + option.value = _forge.make(bool(!strcmp(value.c_str(), "true"))); + assert(option.value.type() == _forge.Bool); } else { throw CommandLineError( (Raul::fmt("bad option type `%1%'") % option.name).str()); -- cgit v1.2.1