diff options
author | David Robillard <d@drobilla.net> | 2011-05-18 05:00:44 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-18 05:00:44 +0000 |
commit | 041c8821438b2c6a83e1513fa2aedf7bbb8cbffd (patch) | |
tree | 9202118e6255d689b9c89a4767cd7da864d865a7 /gtk2_ardour/generic_pluginui.cc | |
parent | 424b3479de067375d28bb867aafe33316dd0ce17 (diff) |
Add 'controls' item to plugin insert context menu to always show Ardour generated controls for plugin, even if the plugin has a GUI. In particular, this gives you UI access to presets and the other handy stuff ardour sticks at the top, for inherently broken external UIs which don't allow Ardour to add such things.
Fix crash related to scale points when showing plugin UIs.
Fix packing of scrolled generic plugin UI so the controls expand (rather than leaving a ton of wasted empty space and using unnecessary scroll bars).
git-svn-id: svn://localhost/ardour2/branches/3.0@9551 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/generic_pluginui.cc')
-rw-r--r-- | gtk2_ardour/generic_pluginui.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 3ed9352755..e7ba8d70bd 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -74,7 +74,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol set_border_width (10); //set_homogeneous (false); - pack_start (main_contents, false, false); + pack_start (main_contents, true, true); settings_box.set_homogeneous (false); HBox* constraint_hbox = manage (new HBox); @@ -99,7 +99,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol VBox* v1_box = manage (new VBox); VBox* v2_box = manage (new VBox); - pack_end (plugin_analysis_expander, true, true); + pack_end (plugin_analysis_expander, false, false); v1_box->pack_start (*smaller_hbox, false, true); v2_box->pack_start (focus_button, false, true); @@ -111,7 +111,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol main_contents.pack_start (*constraint_hbox, false, false); - if ( is_scrollable ) { + if (is_scrollable ) { scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); scroller.set_name ("PluginEditor"); scroller_view.set_name("PluginEditor"); @@ -120,8 +120,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol main_contents.pack_start (scroller, true, true); - } - else { + } else { main_contents.pack_start (hpacker, false, false); } @@ -216,7 +215,7 @@ GenericPluginUI::build () box->set_spacing (1); frame->add (*box); - hpacker.pack_start(*frame,true,true); + hpacker.pack_start(*frame, true, true); x = 1; } @@ -650,7 +649,7 @@ GenericPluginUI::update_control_display (ControlUI* cui) cui->ignore_change++; - if (cui->combo) { + if (cui->combo && cui->combo_map) { std::map<string,float>::iterator it; for (it = cui->combo_map->begin(); it != cui->combo_map->end(); ++it) { if (it->second == val) { @@ -694,7 +693,7 @@ GenericPluginUI::control_port_toggled (ControlUI* cui) void GenericPluginUI::control_combo_changed (ControlUI* cui) { - if (!cui->ignore_change) { + if (!cui->ignore_change && cui->combo_map) { string value = cui->combo->get_active_text(); std::map<string,float> mapping = *cui->combo_map; insert->automation_control(cui->parameter())->set_value(mapping[value]); |