summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/PatchPortModule.cpp17
-rw-r--r--src/gui/PatchPortModule.hpp1
-rw-r--r--src/gui/Port.cpp7
3 files changed, 15 insertions, 10 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());
diff --git a/src/gui/PatchPortModule.hpp b/src/gui/PatchPortModule.hpp
index e85b7c90..6659864a 100644
--- a/src/gui/PatchPortModule.hpp
+++ b/src/gui/PatchPortModule.hpp
@@ -74,7 +74,6 @@ protected:
SharedPtr<PortModel> _model;
SharedPtr<Port> _port;
PortMenu* _menu;
- bool _human_name_visible;
};
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 84557548..e353190d 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -227,10 +227,15 @@ Port::property_changed(const URI& key, const Atom& value)
} else if (key == uris.lv2_portProperty) {
if (value == uris.lv2_toggled)
set_toggled(true);
- } else if (value.type() == Atom::URI) {
+ } else if (key == uris.ctx_context) {
ArtVpathDash* dash = this->dash();
_rect->property_dash() = dash;
set_border_width(dash ? 2.0 : 0.0);
+ } else if (key == uris.lv2_name) {
+ if (value.type() == Atom::STRING
+ && App::instance().configuration()->name_style() == Configuration::HUMAN) {
+ set_name(value.get_string());
+ }
}
}