aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-13 03:16:14 +0000
committerDavid Robillard <d@drobilla.net>2013-01-13 03:16:14 +0000
commit33aa54fa98783d1da2a322ee136c17df7f9c98a5 (patch)
treeaeae07ddb274a2627a92cc686cc557d948887546 /src/gui
parentd4e2d2945b7f63580803168901f64e70c66310d4 (diff)
downloadmachina-33aa54fa98783d1da2a322ee136c17df7f9c98a5.tar.gz
machina-33aa54fa98783d1da2a322ee136c17df7f9c98a5.tar.bz2
machina-33aa54fa98783d1da2a322ee136c17df7f9c98a5.zip
Show selector nodes as dashed.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4950 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeView.cpp13
-rw-r--r--src/gui/NodeView.hpp2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp
index 552bd21..a73b996 100644
--- a/src/gui/NodeView.cpp
+++ b/src/gui/NodeView.cpp
@@ -61,7 +61,7 @@ NodeView::on_double_click(GdkEventButton*)
}
bool
-NodeView::node_is(Raul::Forge& forge, machina::URIInt key)
+NodeView::is(Raul::Forge& forge, machina::URIInt key)
{
const Raul::Atom& value = _node->get(key);
return value.type() == forge.Bool && value.get_bool();
@@ -78,14 +78,13 @@ NodeView::on_event(GdkEvent* event)
canvas->app()->controller()->set_property(
_node->id(),
URIs::instance().machina_initial,
- forge.make(!node_is(forge, URIs::instance().machina_initial)));
+ forge.make(!is(forge, URIs::instance().machina_initial)));
return true;
} else if (event->button.button == 3) {
canvas->app()->controller()->set_property(
_node->id(),
URIs::instance().machina_selector,
- forge.make(!node_is(forge,
- URIs::instance().machina_selector)));
+ forge.make(!is(forge, URIs::instance().machina_selector)));
return true;
}
} else {
@@ -135,7 +134,11 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
if (key == URIs::instance().machina_selector) {
//_node.property_dash() = value.get_bool() ? selector_dash() : 0;
- std::cerr << "FIXME: dash" << std::endl;
+ if (value.get_bool()) {
+ set_dash_length(4.0);
+ } else {
+ set_dash_length(0.0);
+ }
} else if (key == URIs::instance().machina_initial) {
set_border_width(value.get_bool() ? 4.0 : 1.0);
} else if (key == URIs::instance().machina_active) {
diff --git a/src/gui/NodeView.hpp b/src/gui/NodeView.hpp
index 815e9e2..17f8c44 100644
--- a/src/gui/NodeView.hpp
+++ b/src/gui/NodeView.hpp
@@ -56,7 +56,7 @@ private:
void on_property(machina::URIInt key, const Raul::Atom& value);
void on_action_property(machina::URIInt key, const Raul::Atom& value);
- bool node_is(Raul::Forge& forge, machina::URIInt key);
+ bool is(Raul::Forge& forge, machina::URIInt key);
Gtk::Window* _window;
SPtr<machina::client::ClientObject> _node;