[SCM] calf/master: + GUI: add optional text display to meters in generic GUI (PF_CTLO_LABEL)
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:38:00 UTC 2013
The following commit has been merged in the master branch:
commit f2b78a97e3d75c4a63dcb4e1c8a858bea5578179
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Thu Oct 30 23:10:52 2008 +0000
+ GUI: add optional text display to meters in generic GUI (PF_CTLO_LABEL)
diff --git a/src/calf/giface.h b/src/calf/giface.h
index c5b7a15..d1b2b89 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -79,6 +79,7 @@ enum parameter_flags
PF_CTLOPTIONS = 0x00F000,
PF_CTLO_HORIZ = 0x001000, ///< horizontal version of the control
PF_CTLO_VERT = 0x002000, ///< vertical version of the control
+ PF_CTLO_LABEL = 0x004000, ///< add a text display to the control (meters only)
PF_PROP_NOBOUNDS = 0x010000, ///< no epp:hasStrictBounds
PF_PROP_EXPENSIVE = 0x020000, ///< epp:expensive, may trigger expensive calculation
diff --git a/src/gui.cpp b/src/gui.cpp
index 1439330..cfcea48 100644
--- a/src/gui.cpp
+++ b/src/gui.cpp
@@ -247,6 +247,8 @@ void vumeter_param_control::set()
_GUARD_CHANGE_
parameter_properties &props = get_props();
calf_vumeter_set_value (CALF_VUMETER (widget), props.to_01(gui->plugin->get_param_value(param_no)));
+ if (label)
+ update_label();
}
// check box
@@ -542,8 +544,13 @@ GtkWidget *plugin_gui::create(plugin_ctl_iface *_plugin)
{
params[i] = new vumeter_param_control();
widget = params[i]->create(this, i);
- // gtk_widget_set_size_request(widget, -1, 14);
- gtk_table_attach (GTK_TABLE (container), widget, 1, 3, trow, trow + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), GTK_SHRINK, 10, 0);
+ if (props.flags & PF_CTLO_LABEL)
+ {
+ gtk_table_attach (GTK_TABLE (container), widget, 1, 2, trow, trow + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), GTK_SHRINK, 0, 0);
+ gtk_table_attach (GTK_TABLE (container), params[i]->create_label(), 2, 3, trow, trow + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), GTK_SHRINK, 10, 0);
+ }
+ else
+ gtk_table_attach (GTK_TABLE (container), widget, 1, 3, trow, trow + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), GTK_SHRINK, 10, 0);
}
else if ((props.flags & PF_CTLMASK) != PF_CTL_FADER)
{
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list