summaryrefslogtreecommitdiffstats
path: root/src/gui/NodeModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-21 18:45:38 +0000
committerDavid Robillard <d@drobilla.net>2012-11-21 18:45:38 +0000
commit3b257a6a2f81c677cab83111051a79c5c3d5307f (patch)
treec771b0cd89528d51897db11b84601999281c734c /src/gui/NodeModule.cpp
parent716e1e839790be24ebfa56c5fe8b688a3def60d2 (diff)
downloadingen-3b257a6a2f81c677cab83111051a79c5c3d5307f.tar.gz
ingen-3b257a6a2f81c677cab83111051a79c5c3d5307f.tar.bz2
ingen-3b257a6a2f81c677cab83111051a79c5c3d5307f.zip
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
Diffstat (limited to 'src/gui/NodeModule.cpp')
-rw-r--r--src/gui/NodeModule.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 462ac94b..144bd1be 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -21,6 +21,7 @@
#include "lv2/lv2plug.in/ns/ext/atom/util.h"
+#include "ingen/Configuration.hpp"
#include "ingen/Interface.hpp"
#include "ingen/Log.hpp"
#include "ingen/client/BlockModel.hpp"
@@ -252,7 +253,8 @@ NodeModule::embed_gui(bool embed)
void
NodeModule::rename()
{
- if (app().configuration()->name_style() == Configuration::PATH) {
+ if (app().world()->conf().option("port-labels").get_bool() &&
+ !app().world()->conf().option("human-names").get_bool()) {
set_label(_block->path().symbol());
}
}
@@ -261,7 +263,7 @@ void
NodeModule::new_port_view(SharedPtr<const PortModel> port)
{
Port::create(app(), *this, port,
- app().configuration()->name_style() == Configuration::HUMAN);
+ app().world()->conf().option("human-names").get_bool());
port->signal_value_changed().connect(
sigc::bind<0>(sigc::mem_fun(this, &NodeModule::value_changed),
@@ -419,7 +421,7 @@ NodeModule::property_changed(const Raul::URI& key, const Raul::Atom& value)
}
} else if (value.type() == uris.forge.String) {
if (key == uris.lv2_name
- && app().configuration()->name_style() == Configuration::HUMAN) {
+ && app().world()->conf().option("human-names").get_bool()) {
set_label(value.get_string());
}
}