summaryrefslogtreecommitdiffstats
path: root/src/gui/GraphCanvas.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-21 18:45:38 +0000
committerDavid Robillard <d@drobilla.net>2012-11-21 18:45:38 +0000
commit3b257a6a2f81c677cab83111051a79c5c3d5307f (patch)
treec771b0cd89528d51897db11b84601999281c734c /src/gui/GraphCanvas.cpp
parent716e1e839790be24ebfa56c5fe8b688a3def60d2 (diff)
downloadingen-3b257a6a2f81c677cab83111051a79c5c3d5307f.tar.gz
ingen-3b257a6a2f81c677cab83111051a79c5c3d5307f.tar.bz2
ingen-3b257a6a2f81c677cab83111051a79c5c3d5307f.zip
Move human name and port label options to main configuration.
This makes it possible to persistently set the desired style in configuration files. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4843 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/GraphCanvas.cpp')
-rw-r--r--src/gui/GraphCanvas.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 6dfb9175..4405cbb6 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -26,11 +26,12 @@
#include "ganv/Circle.hpp"
#include "ingen/Builder.hpp"
#include "ingen/ClashAvoider.hpp"
+#include "ingen/Configuration.hpp"
#include "ingen/Interface.hpp"
#include "ingen/Log.hpp"
#include "ingen/World.hpp"
-#include "ingen/client/ClientStore.hpp"
#include "ingen/client/BlockModel.hpp"
+#include "ingen/client/ClientStore.hpp"
#include "ingen/client/GraphModel.hpp"
#include "ingen/client/PluginModel.hpp"
#include "ingen/serialisation/Serialiser.hpp"
@@ -78,6 +79,7 @@ GraphCanvas::GraphCanvas(App& app,
, _classless_menu(NULL)
, _plugin_menu(NULL)
, _human_names(true)
+ , _show_port_names(true)
{
Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("canvas_menu");
xml->get_widget("canvas_menu", _menu);
@@ -146,6 +148,9 @@ GraphCanvas::GraphCanvas(App& app,
sigc::mem_fun(this, &GraphCanvas::menu_load_graph));
_menu_new_graph->signal_activate().connect(
sigc::mem_fun(this, &GraphCanvas::menu_new_graph));
+
+ show_human_names(app.world()->conf().option("human-names").get_bool());
+ show_port_names(app.world()->conf().option("port-labels").get_bool());
}
void
@@ -327,6 +332,7 @@ show_module_human_names(GanvNode* node, void* data)
pmod->show_human_names(b);
}
}
+
void
GraphCanvas::show_human_names(bool b)
{