X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplugin_setup_dialog.cc;h=db128b5c5f3ee44eba5165445b5e40da48e8a85a;hb=0ae9cda51d8c807e5c49bdee6c90457f31e58669;hp=5feb76aefe7a550072c10c2a1fdcfd22c295cb30;hpb=cf52d6e4b40111eb04b244ec054055a4ec15dbe0;p=ardour.git diff --git a/gtk2_ardour/plugin_setup_dialog.cc b/gtk2_ardour/plugin_setup_dialog.cc index 5feb76aefe..db128b5c5f 100644 --- a/gtk2_ardour/plugin_setup_dialog.cc +++ b/gtk2_ardour/plugin_setup_dialog.cc @@ -19,11 +19,14 @@ #include #include +#include +#include #include "plugin_setup_dialog.h" #include "pbd/i18n.h" using namespace ARDOUR; +using namespace ArdourWidgets; using namespace Gtk; PluginSetupDialog::PluginSetupDialog (boost::shared_ptr r, boost::shared_ptr pi, ARDOUR::Route::PluginSetupOptions flags) @@ -31,6 +34,7 @@ PluginSetupDialog::PluginSetupDialog (boost::shared_ptr r, boost: , _route (r) , _pi (pi) , _keep_mapping (_("Copy I/O Map"), ArdourButton::led_default_elements) + , _fan_out (_("Fan out"), ArdourButton::led_default_elements) { assert (flags != Route::None); @@ -71,7 +75,7 @@ PluginSetupDialog::PluginSetupDialog (boost::shared_ptr r, boost: f->add (*box); tbl->attach (*f, 0, 1, row, row + 1, EXPAND|FILL, SHRINK, 0, 8); - _keep_mapping.signal_clicked.connect (sigc::mem_fun (*this, &PluginSetupDialog::apply_mapping)); + _keep_mapping.signal_clicked.connect (sigc::mem_fun (*this, &PluginSetupDialog::apply_mapping)); add_button ("Replace", 2); } else { @@ -86,16 +90,19 @@ PluginSetupDialog::PluginSetupDialog (boost::shared_ptr r, boost: Box* box = manage (new HBox ()); box->set_border_width (2); box->pack_start (_out_presets, true, true); + box->pack_start (_fan_out, false, false); Frame* f = manage (new Frame ()); f->set_label (_("Output Configuration")); f->add (*box); tbl->attach (*f, 1, 2, row, row + 1, EXPAND|FILL, SHRINK, 0, 8); + _fan_out.signal_clicked.connect (sigc::mem_fun (*this, &PluginSetupDialog::toggle_fan_out)); } else { _pi->set_preset_out (_pi->natural_output_streams ()); update_sensitivity (_pi->natural_output_streams ().n_audio ()); } _keep_mapping.set_active (false); + _fan_out.set_active (false); apply_mapping (); add_button (Stock::ADD, 0); @@ -162,6 +169,7 @@ PluginSetupDialog::update_sensitivity (uint32_t n_audio) } else { _keep_mapping.set_sensitive (false); } + _fan_out.set_sensitive (n_audio > 2); } bool @@ -190,6 +198,12 @@ PluginSetupDialog::apply_mapping () } } +void +PluginSetupDialog::toggle_fan_out () +{ + _fan_out.set_active (!_fan_out.get_active ()); +} + std::string PluginSetupDialog::preset_label (uint32_t n_audio) const {