summaryrefslogtreecommitdiff
path: root/gtk2_ardour/vst_pluginui.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-12-19 23:11:01 +0000
committerCarl Hetherington <carl@carlh.net>2010-12-19 23:11:01 +0000
commit5f4bdb233a53932986e07fca1cd6c87d22c2886f (patch)
treec9c980115453452dc21931d4337ab1b592f80d95 /gtk2_ardour/vst_pluginui.cc
parentbb7dbe6d86e08ea0fedf12ce50ca3d395aa212a5 (diff)
Clean up plugin preset handling a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@8301 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/vst_pluginui.cc')
-rw-r--r--gtk2_ardour/vst_pluginui.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/gtk2_ardour/vst_pluginui.cc b/gtk2_ardour/vst_pluginui.cc
index be8a619e70..b6902445f3 100644
--- a/gtk2_ardour/vst_pluginui.cc
+++ b/gtk2_ardour/vst_pluginui.cc
@@ -35,8 +35,6 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<
: PlugUIBase (pi),
vst (vp)
{
- update_presets ();
-
fst_run_editor (vst->fst());
preset_box.set_spacing (6);
@@ -45,7 +43,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr<
preset_box.pack_end (delete_button, false, false);
preset_box.pack_end (save_button, false, false);
preset_box.pack_end (add_button, false, false);
- preset_box.pack_end (preset_combo, false, false);
+ preset_box.pack_end (_preset_box, false, false);
bypass_button.set_active (!insert->active());
@@ -61,22 +59,10 @@ VSTPluginUI::~VSTPluginUI ()
}
void
-VSTPluginUI::setting_selected ()
+VSTPluginUI::preset_selected ()
{
- int const r = preset_combo.get_active_row_number ();
-
- if (r < vst->first_user_preset_index()) {
- /* This is a plugin-provided preset.
- We can't dispatch directly here; too many plugins expects only one GUI thread.
- */
- vst->fst()->want_program = r;
- } else {
- /* This is a user preset. This method knows about the direct dispatch restriction, too */
- plugin->load_preset (preset_combo.get_active_text());
- }
-
socket.grab_focus ();
- update_sensitivity ();
+ PlugUIBase::preset_selected ();
}
int