summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchPortModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/PatchPortModule.cpp')
-rw-r--r--src/gui/PatchPortModule.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index b1a71cf2..a32d202f 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -23,13 +23,14 @@
#include "client/PatchModel.hpp"
#include "client/NodeModel.hpp"
#include "App.hpp"
+#include "Configuration.hpp"
+#include "GladeFactory.hpp"
#include "PatchCanvas.hpp"
+#include "PatchWindow.hpp"
#include "Port.hpp"
-#include "GladeFactory.hpp"
+#include "PortMenu.hpp"
#include "RenameWindow.hpp"
-#include "PatchWindow.hpp"
#include "WindowFactory.hpp"
-#include "PortMenu.hpp"
using namespace std;
using namespace Raul;
@@ -41,7 +42,6 @@ namespace GUI {
PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> model)
: FlowCanvas::Module(canvas, "", 0, 0, false) // FIXME: coords?
, _model(model)
- , _human_name_visible(false)
{
assert(canvas);
assert(model);
@@ -113,8 +113,6 @@ void
PatchPortModule::show_human_names(bool b)
{
const LV2URIMap& uris = App::instance().uris();
- using namespace std;
- _human_name_visible = b;
const Atom& name = _model->get_property(uris.lv2_name);
if (b && name.type() == Atom::STRING)
set_name(name.get_string());
@@ -146,11 +144,14 @@ PatchPortModule::set_property(const URI& key, const Atom& value)
}
break;
case Atom::STRING:
- if (key == uris.lv2_name && _human_name_visible) {
+ if (key == uris.lv2_name
+ && App::instance().configuration()->name_style() == Configuration::HUMAN) {
set_name(value.get_string());
- } else if (key == uris.lv2_symbol && !_human_name_visible) {
+ } else if (key == uris.lv2_symbol
+ && App::instance().configuration()->name_style() == Configuration::PATH) {
set_name(value.get_string());
}
+ break;
case Atom::BOOL:
if (key == uris.ingen_polyphonic) {
set_stacked_border(value.get_bool());