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
This commit is contained in:
Carl Hetherington 2011-11-23 17:48:10 +00:00
parent 0a66ccc3bb
commit 013b31f1bb
4 changed files with 24 additions and 15 deletions

View file

@ -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);

View file

@ -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 ();

View file

@ -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;
Gtk::ComboBoxText _preset_combo;
Gtk::Label _preset_modified;
Gtk::Button add_button;
Gtk::Button save_button;
Gtk::Button delete_button;
ArdourButton bypass_button;
Gtk::EventBox focus_button;
/* 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;

View file

@ -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);