summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-11-23 17:48:10 +0000
committerCarl Hetherington <carl@carlh.net>2011-11-23 17:48:10 +0000
commit013b31f1bb17dd54c41aafc879984d9d2b17633d (patch)
treedd03c3786163866796142d4c9c605deb28e0d7dc
parent0a66ccc3bbdbb9e1d185133495e023c248b65bf6 (diff)
Don't fix size of preset combo any more. Comment what
widgets the PlugUIBase makes available for subclasses. Give up on trying to report when a VST plugin's settings have been modified from a preset, since I think it is impossible to do cleanly (you set the preset, then at some point after that the plugin tells you that values have changed using the same mechanism that it uses to report normal user-initiated changes). git-svn-id: svn://localhost/ardour2/branches/3.0@10798 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/generic_pluginui.cc3
-rw-r--r--gtk2_ardour/plugin_ui.cc4
-rw-r--r--gtk2_ardour/plugin_ui.h18
-rw-r--r--gtk2_ardour/vst_plugin_ui.cc2
4 files changed, 18 insertions, 9 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 8341883e9b..fc76cd57ef 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -88,7 +88,8 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
set_latency_label ();
smaller_hbox->pack_start (latency_button, false, false, 10);
- smaller_hbox->pack_start (_preset_box, false, false);
+ smaller_hbox->pack_start (_preset_combo, false, false);
+ smaller_hbox->pack_start (_preset_modified, false, false);
smaller_hbox->pack_start (add_button, false, false);
smaller_hbox->pack_start (save_button, false, false);
smaller_hbox->pack_start (delete_button, false, false);
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 66f418b6fe..2d73e62d95 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -461,7 +461,6 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
, plugin_analysis_expander (_("Plugin analysis"))
, eqgui (0)
{
- _preset_combo.set_size_request (100, -1);
_preset_modified.set_size_request (16, -1);
_preset_combo.signal_changed().connect(sigc::mem_fun(*this, &PlugUIBase::preset_selected));
ARDOUR_UI::instance()->set_tip (_preset_combo, _("Presets (if any) for this plugin\n(Both factory and user-created)"));
@@ -471,9 +470,6 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
ARDOUR_UI::instance()->set_tip (bypass_button, _("Disable signal processing by the plugin"));
_no_load_preset = 0;
- _preset_box.pack_start (_preset_combo);
- _preset_box.pack_start (_preset_modified);
-
update_preset_list ();
update_preset ();
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 587001fcfe..92af891803 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -107,23 +107,35 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL
protected:
boost::shared_ptr<ARDOUR::PluginInsert> insert;
boost::shared_ptr<ARDOUR::Plugin> plugin;
- Gtk::HBox _preset_box;
+
+ /* UI elements that can subclasses can add to their widgets */
+
+ /** a ComboBoxText which lists presets and manages their selection */
Gtk::ComboBoxText _preset_combo;
+ /** a label which has a * in if the current settings are different from the preset being shown */
Gtk::Label _preset_modified;
+ /** a button to add a preset */
Gtk::Button add_button;
+ /** a button to save the current settings as a new user preset */
Gtk::Button save_button;
+ /** a button to delete the current preset (if it is a user one) */
Gtk::Button delete_button;
+ /** a button to bypass the plugin */
ArdourButton bypass_button;
+ /** a button to acquire keyboard focus */
Gtk::EventBox focus_button;
-
+ /** an expander containing the plugin analysis graph */
+ Gtk::Expander plugin_analysis_expander;
+ /** a label indicating the plugin latency */
Gtk::Label latency_label;
+ /** a button which, when clicked, opens the latency GUI */
Gtk::Button latency_button;
+
void set_latency_label ();
LatencyGUI* latency_gui;
ArdourWindow* latency_dialog;
- Gtk::Expander plugin_analysis_expander;
PluginEqGui* eqgui;
Gtk::Requisition pre_eq_size;
diff --git a/gtk2_ardour/vst_plugin_ui.cc b/gtk2_ardour/vst_plugin_ui.cc
index 758c38cd8f..4c1fc6eade 100644
--- a/gtk2_ardour/vst_plugin_ui.cc
+++ b/gtk2_ardour/vst_plugin_ui.cc
@@ -34,7 +34,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> insert, boost:
box->pack_end (delete_button, false, false);
box->pack_end (save_button, false, false);
box->pack_end (add_button, false, false);
- box->pack_end (_preset_box, false, false);
+ box->pack_end (_preset_combo, false, false);
if (!insert->active ()) {
bypass_button.set_active_state (Gtkmm2ext::Active);