summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchPortModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-04 19:15:40 +0000
committerDavid Robillard <d@drobilla.net>2010-02-04 19:15:40 +0000
commit89405ae847f6690471462319a794c541cc6343b1 (patch)
tree9d234fb528a8f2b41500f716fc82fd76418d5a30 /src/gui/PatchPortModule.cpp
parent6483b0601eba9489e9113f8f802a7176bdfda527 (diff)
downloadingen-89405ae847f6690471462319a794c541cc6343b1.tar.gz
ingen-89405ae847f6690471462319a794c541cc6343b1.tar.bz2
ingen-89405ae847f6690471462319a794c541cc6343b1.zip
Change patch port label when human name changes (e.g. update label when changed in the rename dialog).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2424 a436a847-0d15-0410-975c-d299462d15a1
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());