13
0

implementation for "prefer inline over GUI"

This commit is contained in:
Robin Gareus 2016-03-15 00:27:03 +01:00
parent 2b77d6ba85
commit cb4f15ff43
3 changed files with 17 additions and 2 deletions

View File

@ -2040,7 +2040,9 @@ ProcessorBox::use_plugins (const SelectedPlugins& plugins)
return true;
// XXX SHAREDPTR delete plugin here .. do we even need to care?
} else if (plugins.size() == 1 && Config->get_open_gui_after_adding_plugin()) {
if (_session->engine().connected () && processor_can_be_edited (processor)) {
if (boost::dynamic_pointer_cast<PluginInsert>(processor)->plugin()->has_inline_display() && Config->get_prefer_inline_over_gui()) {
;
} else if (_session->engine().connected () && processor_can_be_edited (processor)) {
if ((*p)->has_editor ()) {
edit_processor (processor);
} else {

View File

@ -2912,11 +2912,19 @@ if (!Profile->get_mixbus()) {
#ifdef LV2_SUPPORT
add_option (_("Plugins"),
new BoolOption (
"show-inline-display-by-default,",
"show-inline-display-by-default",
_("Show Plugin Inline Display on Mixerstrip by default"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_show_inline_display_by_default),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_show_inline_display_by_default)
));
_plugin_prefer_inline = new BoolOption (
"prefer-inline-over-gui",
_("Don't automatically open the plugin GUI when the plugin has an inline display mode"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_prefer_inline_over_gui),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_prefer_inline_over_gui)
);
add_option (_("Plugins"), _plugin_prefer_inline);
#endif
#endif
@ -3242,6 +3250,10 @@ RCOptionEditor::parameter_changed (string const & p)
bool const s = Config->get_send_ltc ();
_ltc_send_continuously->set_sensitive (s);
_ltc_volume_slider->set_sensitive (s);
} else if (p == "open-gui-after-adding-plugin" || p == "show-inline-display-by-default") {
#ifdef LV2_SUPPORT
_plugin_prefer_inline->set_sensitive (Config->get_open_gui_after_adding_plugin() && Config->get_show_inline_display_by_default());
#endif
}
}

View File

@ -58,6 +58,7 @@ private:
HSliderOption* _ltc_volume_slider;
Gtk::Adjustment* _ltc_volume_adjustment;
BoolOption* _ltc_send_continuously;
BoolOption* _plugin_prefer_inline;
PBD::ScopedConnection parameter_change_connection;
PBD::ScopedConnection engine_started_connection;