diff options
author | David Robillard <d@drobilla.net> | 2014-01-04 01:02:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-04 01:02:04 +0000 |
commit | 9dbb41032c9f042912fee7fe58b95657c8cf01f3 (patch) | |
tree | 3cec3140b4c99809835ece3857221eacc7a2c3bb /src/port.c | |
parent | 86e10680c0f0c4d9f421ece6ec84cd898913af79 (diff) | |
download | ganv-9dbb41032c9f042912fee7fe58b95657c8cf01f3.tar.gz ganv-9dbb41032c9f042912fee7fe58b95657c8cf01f3.tar.bz2 ganv-9dbb41032c9f042912fee7fe58b95657c8cf01f3.zip |
Make only control inputs controllable by user.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5251 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r-- | src/port.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -40,7 +40,8 @@ static GanvBoxClass* parent_class; enum { PROP_0, - PROP_IS_INPUT + PROP_IS_INPUT, + PROP_IS_CONTROLLABLE }; enum { @@ -56,7 +57,8 @@ ganv_port_init(GanvPort* port) port->impl = G_TYPE_INSTANCE_GET_PRIVATE( port, GANV_TYPE_PORT, GanvPortImpl); - port->impl->is_input = TRUE; + port->impl->is_input = TRUE; + port->impl->is_controllable = FALSE; } static void @@ -96,6 +98,7 @@ ganv_port_set_property(GObject* object, switch (prop_id) { SET_CASE(IS_INPUT, boolean, port->impl->is_input); + SET_CASE(IS_CONTROLLABLE, boolean, port->impl->is_controllable); default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -115,6 +118,7 @@ ganv_port_get_property(GObject* object, switch (prop_id) { GET_CASE(IS_INPUT, boolean, port->impl->is_input); + GET_CASE(IS_CONTROLLABLE, boolean, port->impl->is_controllable); default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); break; @@ -354,6 +358,14 @@ ganv_port_class_init(GanvPortClass* klass) 0, G_PARAM_READWRITE)); + g_object_class_install_property( + gobject_class, PROP_IS_CONTROLLABLE, g_param_spec_boolean( + "is-controllable", + _("Is controllable"), + _("Whether this port can be controlled by the user."), + 0, + G_PARAM_READWRITE)); + port_signals[PORT_VALUE_CHANGED] = g_signal_new("value-changed", G_TYPE_FROM_CLASS(klass), |