aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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'