summaryrefslogtreecommitdiffstats
path: root/src/gui/GraphBox.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/GraphBox.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/GraphBox.cpp')
-rw-r--r--src/gui/GraphBox.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp
index b0847f4a..2fd796d8 100644
--- a/src/gui/GraphBox.cpp
+++ b/src/gui/GraphBox.cpp
@@ -24,6 +24,7 @@
#include <gtkmm/stock.h>
#include "ingen/Interface.hpp"
+#include "ingen/Configuration.hpp"
#include "ingen/client/ClientStore.hpp"
#include "ingen/client/GraphModel.hpp"
@@ -183,8 +184,8 @@ GraphBox::init_box(App& app)
_menu_view_graph_tree_window->signal_activate().connect(
sigc::mem_fun<void>(_app->graph_tree(), &GraphTreeWindow::present));
- _menu_help_about->signal_activate().connect(sigc::hide_return(
- sigc::mem_fun(_app, &App::show_about)));
+ _menu_help_about->signal_activate().connect(
+ sigc::hide_return(sigc::mem_fun(_app, &App::show_about)));
_breadcrumbs = new BreadCrumbs(*_app);
_breadcrumbs->signal_graph_selected.connect(
@@ -279,6 +280,11 @@ GraphBox::set_graph(SharedPtr<const GraphModel> graph,
_view->signal_object_left.connect(
sigc::mem_fun(this, &GraphBox::object_left));
+ _menu_human_names->set_active(
+ _app->world()->conf().option("human-names").get_bool());
+ _menu_show_port_names->set_active(
+ _app->world()->conf().option("port-labels").get_bool());
+
_enable_signal = true;
}
@@ -684,15 +690,17 @@ void
GraphBox::event_human_names_toggled()
{
_view->canvas()->show_human_names(_menu_human_names->get_active());
- if (_menu_human_names->get_active())
- _app->configuration()->set_name_style(Configuration::HUMAN);
- else
- _app->configuration()->set_name_style(Configuration::PATH);
+ _app->world()->conf().set(
+ "human-names",
+ _app->world()->forge().make(_menu_human_names->get_active()));
}
void
GraphBox::event_port_names_toggled()
{
+ _app->world()->conf().set(
+ "port-labels",
+ _app->world()->forge().make(_menu_show_port_names->get_active()));
if (_menu_show_port_names->get_active()) {
_view->canvas()->set_direction(GANV_DIRECTION_RIGHT);
_view->canvas()->show_port_names(true);