summaryrefslogtreecommitdiffstats
path: root/src/libs/gui/NodeModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-28 04:55:46 +0000
committerDavid Robillard <d@drobilla.net>2008-09-28 04:55:46 +0000
commit46459ab2f46fdb826102562c266b0bc2921a3737 (patch)
tree892a8974c7a42316fc29e07c039360dbebbdce91 /src/libs/gui/NodeModule.cpp
parentd83003cd073380fe0a28cd1b3ce40dc7ab072fe0 (diff)
downloadingen-46459ab2f46fdb826102562c266b0bc2921a3737.tar.gz
ingen-46459ab2f46fdb826102562c266b0bc2921a3737.tar.bz2
ingen-46459ab2f46fdb826102562c266b0bc2921a3737.zip
Remove header namespace pollution (particularly from libs/gui/App.hpp).
Fix more LV2 plugin RDF race/lock issues with -eg. Show human readable names on new ports when human readable is set (fix ticket #202). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1523 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui/NodeModule.cpp')
-rw-r--r--src/libs/gui/NodeModule.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index 09df174e..f8308264 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -31,6 +31,9 @@
#include "RenameWindow.hpp"
#include "SubpatchModule.hpp"
#include "WindowFactory.hpp"
+#include "Configuration.hpp"
+
+using namespace std;
namespace Ingen {
namespace GUI {
@@ -227,8 +230,12 @@ NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
{
uint32_t index = _ports.size(); // FIXME: kludge, engine needs to tell us this
+ string name = (App::instance().configuration()->name_style() == Configuration::PATH)
+ ? port->path().name()
+ : ((PluginModel*)node()->plugin())->port_human_name(index);
+
Module::add_port(boost::shared_ptr<Port>(
- new Port(PtrCast<NodeModule>(shared_from_this()), port)));
+ new Port(PtrCast<NodeModule>(shared_from_this()), port, name)));
port->signal_value_changed.connect(sigc::bind<0>(
sigc::mem_fun(this, &NodeModule::value_changed), index));