aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-11-01 02:39:29 +0000
committerDavid Robillard <d@drobilla.net>2013-11-01 02:39:29 +0000
commit6f24e3c12694a2ec697be35b16b47c0dbe47d507 (patch)
tree0a9984e5c8c8b4c930ff7e907abdd2629de3987b
parentc6c9c32f922a86c4b4816cefbda0805774f0d1a6 (diff)
downloadjalv-6f24e3c12694a2ec697be35b16b47c0dbe47d507.tar.gz
jalv-6f24e3c12694a2ec697be35b16b47c0dbe47d507.tar.bz2
jalv-6f24e3c12694a2ec697be35b16b47c0dbe47d507.zip
Hide controls for ports with notOnGUI property in generic UI.
Based on #936. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5165 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--NEWS7
-rw-r--r--src/jalv_gtk.c10
-rw-r--r--src/jalv_internal.h13
-rw-r--r--wscript2
4 files changed, 25 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 7b9148c..7cf05a3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+jalv (1.4.3) unstable;
+
+ * Hide controls for ports with notOnGUI property in generic UI
+ (based on patch from Robin Gareus)
+
+ -- David Robillard <d@drobilla.net> Thu, 31 Oct 2013 22:38:42 -0400
+
jalv (1.4.2) stable;
* Fix crash when running "jalv" with bad command line arguments
diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c
index 1698f32..29df231 100644
--- a/src/jalv_gtk.c
+++ b/src/jalv_gtk.c
@@ -87,6 +87,8 @@ jalv_init(int* argc, char*** argv, JalvOptions* opts)
"Load state from save directory", "DIR" },
{ "dump", 'd', 0, G_OPTION_ARG_NONE, &opts->dump,
"Dump plugin <=> UI communication", NULL },
+ { "show-hidden", 's', 0, G_OPTION_ARG_NONE, &opts->show_hidden,
+ "Show controls for ports with notOnGUI property on generic UI", NULL },
{ "generic-ui", 'g', 0, G_OPTION_ARG_NONE, &opts->generic_ui,
"Use Jalv generic UI and not the plugin UI", NULL},
{ "buffer-size", 'b', 0, G_OPTION_ARG_INT, &opts->buffer_size,
@@ -608,6 +610,7 @@ build_control_widget(Jalv* jalv, GtkWidget* window)
LilvNode* lv2_toggled = lilv_new_uri(world, LV2_CORE__toggled);
LilvNode* patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
LilvNode* rdfs_comment = lilv_new_uri(world, LILV_NS_RDFS "comment");
+ LilvNode* pprop_notOnGUI = lilv_new_uri(world, LV2_PORT_PROPS__notOnGUI);
GtkWidget* port_table = gtk_table_new(jalv->num_ports, 3, false);
/* Get the min and max of all ports (or NaN if unavailable) */
@@ -629,6 +632,12 @@ build_control_widget(Jalv* jalv, GtkWidget* window)
int n_rows = 0;
for (unsigned i = 0; i < control_ports->len; ++i) {
const LilvPort* port = g_array_index(control_ports, LilvPort*, i);
+
+ if (!jalv->opts.show_hidden &&
+ lilv_port_has_property(plugin, port, pprop_notOnGUI)) {
+ continue;
+ }
+
uint32_t index = lilv_port_get_index(plugin, port);
LilvNode* name = lilv_port_get_name(plugin, port);
@@ -729,6 +738,7 @@ build_control_widget(Jalv* jalv, GtkWidget* window)
lilv_node_free(lv2_sampleRate);
lilv_node_free(lv2_integer);
lilv_node_free(lv2_enumeration);
+ lilv_node_free(pprop_notOnGUI);
lilv_node_free(logarithmic);
if (n_rows > 0) {
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index 8b41581..8ea45df 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -85,12 +85,13 @@ typedef struct {
} ControlChange;
typedef struct {
- char* uuid;
- char* load;
- uint32_t buffer_size;
- double update_rate;
- bool dump;
- bool generic_ui;
+ char* uuid; ///< Session UUID
+ char* load; ///< Path for state to load
+ uint32_t buffer_size; ///< Plugin<=>UI communication buffer size
+ double update_rate; ///< UI update rate in Hz
+ int dump; ///< Dump communication iff true
+ int generic_ui; ///< Use generic UI iff true
+ int show_hidden; ///< Show controls for notOnGUI ports
} JalvOptions;
typedef struct {
diff --git a/wscript b/wscript
index bbb0318..058c7b7 100644
--- a/wscript
+++ b/wscript
@@ -4,7 +4,7 @@ from waflib.extras import autowaf as autowaf
import waflib.Options as Options
# Version of this package (even if built as a child)
-JALV_VERSION = '1.4.2'
+JALV_VERSION = '1.4.3'
# Variables for 'waf dist'
APPNAME = 'jalv'