summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-04 19:21:46 +0000
committerDavid Robillard <d@drobilla.net>2010-02-04 19:21:46 +0000
commit02b16c6c80b4dd2d52fe3f34a800fef67e31611b (patch)
tree63bca53c951728aa53424f7fdc26eb836b4c2faa /src/gui
parent89405ae847f6690471462319a794c541cc6343b1 (diff)
downloadingen-02b16c6c80b4dd2d52fe3f34a800fef67e31611b.tar.gz
ingen-02b16c6c80b4dd2d52fe3f34a800fef67e31611b.tar.bz2
ingen-02b16c6c80b4dd2d52fe3f34a800fef67e31611b.zip
Follow lv2:name for nodes as well (when human names are visible).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2425 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeModule.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 58366377..9f10ffe7 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -121,16 +121,20 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
void
NodeModule::show_human_names(bool b)
{
+ const LV2URIMap& uris = App::instance().uris();
+
if (b && node()->plugin()) {
Glib::Mutex::Lock lock(App::instance().world()->rdf_world->mutex());
- set_name(node()->plugin_model()->human_name());
+ const Raul::Atom& name_property = node()->get_property(uris.lv2_name);
+ if (name_property.type() == Atom::STRING)
+ set_name(name_property.get_string());
+ else
+ set_name(node()->plugin_model()->human_name());
} else {
b = false;
set_name(node()->symbol().c_str());
}
- const LV2URIMap& uris = App::instance().uris();
-
for (PortVector::const_iterator i = ports().begin(); i != ports().end(); ++i) {
SharedPtr<Ingen::GUI::Port> port = PtrCast<Ingen::GUI::Port>(*i);
Glib::ustring label(port->model()->symbol().c_str());
@@ -417,6 +421,12 @@ NodeModule::set_property(const URI& key, const Atom& value)
_canvas.lock()->unselect_item(shared_from_this());
}
}
+ break;
+ case Atom::STRING:
+ if (key == uris.lv2_name
+ && App::instance().configuration()->name_style() == Configuration::HUMAN) {
+ set_name(value.get_string());
+ }
default: break;
}
}