X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Froute_ui.cc;h=c264588b2b2f70f9ce836bdffbcad831f72322ad;hb=0b55529ec42c7130421ba37f0762cec83e1e4df3;hp=9bedb9b521a75c36746722d2ff3b86d2372bc1cb;hpb=bcac4f1c96c6c5d67a145c38d2cb56429f0040da;p=ardour.git diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 9bedb9b521..c264588b2b 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -46,16 +46,13 @@ #include "route_time_axis.h" #include "group_tabs.h" -#include "ardour/route.h" -#include "ardour/event_type_map.h" -#include "ardour/session.h" -#include "ardour/audioengine.h" #include "ardour/audio_track.h" +#include "ardour/audioengine.h" +#include "ardour/filename_extensions.h" #include "ardour/midi_track.h" +#include "ardour/route.h" +#include "ardour/session.h" #include "ardour/template_utils.h" -#include "ardour/filename_extensions.h" -#include "ardour/directory_names.h" -#include "ardour/profile.h" #include "i18n.h" using namespace Gtk; @@ -64,6 +61,8 @@ using namespace ARDOUR; using namespace PBD; uint32_t RouteUI::_max_invert_buttons = 3; +sigc::signal > RouteUI::BusSendDisplayChanged; +boost::weak_ptr RouteUI::_showing_sends_to; RouteUI::RouteUI (ARDOUR::Session* sess) : AxisView(sess) @@ -127,14 +126,14 @@ RouteUI::init () show_sends_button->set_name ("send alert button"); UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), ""); - monitor_input_button = manage (new ArdourButton (ArdourButton::led_default_elements)); - monitor_input_button->set_name ("monitor"); + monitor_input_button = manage (new ArdourButton (ArdourButton::default_elements)); + monitor_input_button->set_name ("monitor button"); monitor_input_button->set_text (_("In")); UI::instance()->set_tip (monitor_input_button, _("Monitor input"), ""); monitor_input_button->set_no_show_all (true); - - monitor_disk_button = manage (new ArdourButton (ArdourButton::led_default_elements)); - monitor_disk_button->set_name ("monitor"); + + monitor_disk_button = manage (new ArdourButton (ArdourButton::default_elements)); + monitor_disk_button->set_name ("monitor button"); monitor_disk_button->set_text (_("Disk")); UI::instance()->set_tip (monitor_disk_button, _("Monitor playback"), ""); monitor_disk_button->set_no_show_all (true); @@ -143,8 +142,8 @@ RouteUI::init () _session->TransportStateChange.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::check_rec_enable_sensitivity, this), gui_context()); _session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::session_rec_enable_changed, this), gui_context()); - _session->config.ParameterChanged.connect (*this, invalidator (*this), ui_bind (&RouteUI::parameter_changed, this, _1), gui_context()); - Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&RouteUI::parameter_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context()); rec_enable_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_press), false); rec_enable_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_release), false); @@ -165,6 +164,8 @@ RouteUI::init () monitor_disk_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_press)); monitor_disk_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_release)); + + BusSendDisplayChanged.connect (sigc::mem_fun (*this, &RouteUI::bus_send_display_changed)); } void @@ -206,7 +207,7 @@ RouteUI::set_route (boost::shared_ptr rp) solo_button->set_controllable (_route->solo_control()); _route->active_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_active_changed, this), gui_context()); - _route->mute_changed.connect (route_connections, invalidator (*this), ui_bind (&RouteUI::mute_changed, this, _1), gui_context()); + _route->mute_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::mute_changed, this, _1), gui_context()); _route->solo_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); _route->solo_safe_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); @@ -214,10 +215,10 @@ RouteUI::set_route (boost::shared_ptr rp) _route->solo_isolated_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::update_solo_display, this), gui_context()); _route->phase_invert_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::polarity_changed, this), gui_context()); - _route->PropertyChanged.connect (route_connections, invalidator (*this), ui_bind (&RouteUI::property_changed, this, _1), gui_context()); + _route->PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::property_changed, this, _1), gui_context()); - _route->io_changed.connect (route_connections, invalidator (*this), ui_bind (&RouteUI::setup_invert_buttons, this), gui_context ()); - _route->gui_changed.connect (route_connections, invalidator (*this), ui_bind (&RouteUI::route_gui_changed, this, _1), gui_context ()); + _route->io_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::setup_invert_buttons, this), gui_context ()); + _route->gui_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_gui_changed, this, _1), gui_context ()); if (_session->writable() && is_track()) { boost::shared_ptr t = boost::dynamic_pointer_cast(_route); @@ -231,7 +232,7 @@ RouteUI::set_route (boost::shared_ptr rp) if (is_midi_track()) { midi_track()->StepEditStatusChange.connect (route_connections, invalidator (*this), - ui_bind (&RouteUI::step_edit_changed, this, _1), gui_context()); + boost::bind (&RouteUI::step_edit_changed, this, _1), gui_context()); } } @@ -258,6 +259,12 @@ RouteUI::set_route (boost::shared_ptr rp) setup_invert_buttons (); set_invert_button_state (); + + boost::shared_ptr s = _showing_sends_to.lock (); + bus_send_display_changed (s); + + update_mute_display (); + update_solo_display (); } void @@ -378,7 +385,8 @@ RouteUI::solo_press(GdkEventButton* ev) if (Keyboard::is_context_menu_event (ev)) { - if (!solo_isolated_led) { + if (! (solo_isolated_led && solo_isolated_led->is_visible()) || + ! (solo_safe_led && solo_safe_led->is_visible())) { if (solo_menu == 0) { build_solo_menu (); @@ -532,17 +540,14 @@ RouteUI::rec_enable_press(GdkEventButton* ev) if (is_midi_track()) { - /* cannot rec-enable while step-editing */ + /* rec-enable button exits from step editing */ if (midi_track()->step_editing()) { - return true; + midi_track()->set_step_editing (false); + return true; } } - cerr << name() << " re button press, i am " << _i_am_the_modifier << " active state = " - << rec_enable_button->active_state() - << endl; - if (!_i_am_the_modifier && is_track() && rec_enable_button) { if (Keyboard::is_button2_event (ev)) { @@ -600,20 +605,20 @@ RouteUI::update_monitoring_display () MonitorState ms = t->monitoring_state(); if (t->monitoring_choice() & MonitorInput) { - monitor_input_button->set_active_state (Gtkmm2ext::Active); + monitor_input_button->set_active_state (Gtkmm2ext::ExplicitActive); } else { if (ms & MonitoringInput) { - monitor_input_button->set_active_state (Gtkmm2ext::Mid); + monitor_input_button->set_active_state (Gtkmm2ext::ImplicitActive); } else { monitor_input_button->unset_active_state (); } } if (t->monitoring_choice() & MonitorDisk) { - monitor_disk_button->set_active_state (Gtkmm2ext::Active); + monitor_disk_button->set_active_state (Gtkmm2ext::ExplicitActive); } else { if (ms & MonitoringDisk) { - monitor_disk_button->set_active_state (Gtkmm2ext::Mid); + monitor_disk_button->set_active_state (Gtkmm2ext::ImplicitActive); } else { monitor_disk_button->unset_active_state (); } @@ -621,7 +626,7 @@ RouteUI::update_monitoring_display () } bool -RouteUI::monitor_input_press(GdkEventButton* ev) +RouteUI::monitor_input_press(GdkEventButton*) { return true; } @@ -633,7 +638,7 @@ RouteUI::monitor_input_release(GdkEventButton* ev) } bool -RouteUI::monitor_disk_press (GdkEventButton* ev) +RouteUI::monitor_disk_press (GdkEventButton*) { return true; } @@ -736,7 +741,7 @@ RouteUI::step_edit_changed (bool yn) { if (yn) { if (rec_enable_button) { - rec_enable_button->set_active_state (Active); + rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive); } start_step_editing (); @@ -888,22 +893,13 @@ RouteUI::show_sends_press(GdkEventButton* ev) } else { - /* change button state */ + boost::shared_ptr s = _showing_sends_to.lock (); - show_sends_button->set_active_state (Active); - - /* start blinking */ - - if (show_sends_button->active_state()) { - /* show sends to this bus */ - MixerStrip::SwitchIO (_route); - send_blink_connection = ARDOUR_UI::instance()->Blink.connect (sigc::mem_fun(*this, &RouteUI::send_blink)); + if (s == _route) { + set_showing_sends_to (boost::shared_ptr ()); } else { - /* everybody back to normal */ - send_blink_connection.disconnect (); - MixerStrip::SwitchIO (boost::shared_ptr()); + set_showing_sends_to (_route); } - } } @@ -924,9 +920,9 @@ RouteUI::send_blink (bool onoff) } if (onoff) { - show_sends_button->set_state (STATE_ACTIVE); + show_sends_button->set_active_state (Gtkmm2ext::ExplicitActive); } else { - show_sends_button->set_state (STATE_NORMAL); + show_sends_button->unset_active_state (); } } @@ -934,27 +930,27 @@ Gtkmm2ext::ActiveState RouteUI::solo_active_state (boost::shared_ptr r) { if (r->is_master() || r->is_monitor()) { - return ActiveState (0); + return Gtkmm2ext::Off; } if (Config->get_solo_control_is_listen_control()) { if (r->listening_via_monitor()) { - return Active; + return Gtkmm2ext::ExplicitActive; } else { - return ActiveState (0); + return Gtkmm2ext::Off; } } if (r->soloed()) { if (!r->self_soloed()) { - return Mid; + return Gtkmm2ext::ImplicitActive; } else { - return Active; + return Gtkmm2ext::ExplicitActive; } } else { - return ActiveState(0); + return Gtkmm2ext::Off; } } @@ -962,13 +958,13 @@ Gtkmm2ext::ActiveState RouteUI::solo_isolate_active_state (boost::shared_ptr r) { if (r->is_master() || r->is_monitor()) { - return ActiveState (0); + return Gtkmm2ext::Off; } if (r->solo_isolated()) { - return Active; + return Gtkmm2ext::ExplicitActive; } else { - return ActiveState(0); + return Gtkmm2ext::Off; } } @@ -976,43 +972,19 @@ Gtkmm2ext::ActiveState RouteUI::solo_safe_active_state (boost::shared_ptr r) { if (r->is_master() || r->is_monitor()) { - return ActiveState (0); + return Gtkmm2ext::Off; } if (r->solo_safe()) { - return Active; + return Gtkmm2ext::ExplicitActive; } else { - return ActiveState (0); + return Gtkmm2ext::Off; } } void RouteUI::update_solo_display () { - bool x; - - if (Config->get_solo_control_is_listen_control()) { - - if ((solo_button->active_state() == Active)!= (x = _route->listening_via_monitor())) { - ++_i_am_the_modifier; - solo_button->set_active_state (Active); - --_i_am_the_modifier; - } - - } else { - - if ((solo_button->active_state() == Active) != (x = _route->soloed())) { - ++_i_am_the_modifier; - if (x) { - solo_button->set_active_state (Active); - } else { - solo_button->unset_active_state(); - } - --_i_am_the_modifier; - } - - } - bool yn = _route->solo_safe (); if (solo_safe_check && solo_safe_check->get_active() != yn) { @@ -1029,7 +1001,7 @@ RouteUI::update_solo_display () if (solo_isolated_led) { if (_route->solo_isolated()) { - solo_isolated_led->set_active_state (Gtkmm2ext::Active); + solo_isolated_led->set_active_state (Gtkmm2ext::ExplicitActive); } else { solo_isolated_led->unset_active_state (); } @@ -1037,7 +1009,7 @@ RouteUI::update_solo_display () if (solo_safe_led) { if (_route->solo_safe()) { - solo_safe_led->set_active_state (Gtkmm2ext::Active); + solo_safe_led->set_active_state (Gtkmm2ext::ExplicitActive); } else { solo_safe_led->unset_active_state (); } @@ -1066,7 +1038,7 @@ RouteUI::mute_changed(void* /*src*/) ActiveState RouteUI::mute_active_state (Session* s, boost::shared_ptr r) { - if (r->is_master() || r->is_monitor()) { + if (r->is_monitor()) { return ActiveState(0); } @@ -1075,22 +1047,23 @@ RouteUI::mute_active_state (Session* s, boost::shared_ptr r) if (r->muted ()) { /* full mute */ - return Active; - } else if (s->soloing() && !r->soloed() && !r->solo_isolated()) { - return Mid; + return Gtkmm2ext::ExplicitActive; + } else if (!r->is_master() && s->soloing() && !r->soloed() && !r->solo_isolated()) { + /* master is NEVER muted by others */ + return Gtkmm2ext::ImplicitActive; } else { /* no mute at all */ - return ActiveState(0); + return Gtkmm2ext::Off; } } else { if (r->muted()) { /* full mute */ - return Active; + return Gtkmm2ext::ExplicitActive; } else { /* no mute at all */ - return ActiveState(0); + return Gtkmm2ext::Off; } } @@ -1131,12 +1104,12 @@ RouteUI::update_rec_display () if (_route->record_enabled()) { switch (_session->record_status ()) { case Session::Recording: - rec_enable_button->set_active_state (Active); + rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive); break; case Session::Disabled: case Session::Enabled: - rec_enable_button->set_active_state (Mid); + rec_enable_button->set_active_state (Gtkmm2ext::ImplicitActive); break; } @@ -1311,10 +1284,13 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev) } bool -RouteUI::solo_safe_button_release (GdkEventButton*) +RouteUI::solo_safe_button_release (GdkEventButton* ev) { - _route->set_solo_safe (!solo_safe_led->active_state(), this); - return true; + if (ev->button == 1) { + _route->set_solo_safe (!solo_safe_led->active_state(), this); + return true; + } + return false; } void @@ -1368,7 +1344,7 @@ RouteUI::set_color (const Gdk::Color & c) the time axis view and the mixer strip */ - gui_object_state().set (route_state_id(), X_("color"), buf); + gui_object_state().set_property (route_state_id(), X_("color"), buf); _route->gui_changed ("color", (void *) 0); /* EMIT_SIGNAL */ } @@ -1513,6 +1489,9 @@ RouteUI::route_rename () done = true; } break; + default: + done = true; + break; } } @@ -1649,14 +1628,14 @@ RouteUI::adjust_latency () void RouteUI::save_as_template () { - sys::path path; + std::string path; std::string safe_name; string name; path = ARDOUR::user_route_template_directory (); - if (g_mkdir_with_parents (path.to_string().c_str(), 0755)) { - error << string_compose (_("Cannot create route template directory %1"), path.to_string()) << endmsg; + if (g_mkdir_with_parents (path.c_str(), 0755)) { + error << string_compose (_("Cannot create route template directory %1"), path) << endmsg; return; } @@ -1678,9 +1657,9 @@ RouteUI::save_as_template () safe_name = legalize_for_path (name); safe_name += template_suffix; - path /= safe_name; + path = Glib::build_filename (path, safe_name); - _route->save_as_template (path.to_string(), name); + _route->save_as_template (path, name); } void @@ -1737,27 +1716,53 @@ void RouteUI::open_remote_control_id_dialog () { ArdourDialog dialog (_("Remote Control ID")); + SpinButton* spin = 0; - uint32_t const limit = _session->ntracks() + _session->nbusses () + 4; + dialog.get_vbox()->set_border_width (18); - HBox* hbox = manage (new HBox); - hbox->set_spacing (6); - hbox->pack_start (*manage (new Label (_("Remote control ID:")))); - SpinButton* spin = manage (new SpinButton); - spin->set_digits (0); - spin->set_increments (1, 10); - spin->set_range (0, limit); - spin->set_value (_route->remote_control_id()); - hbox->pack_start (*spin); - dialog.get_vbox()->pack_start (*hbox); - - dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL); - dialog.add_button (Stock::APPLY, RESPONSE_ACCEPT); + if (Config->get_remote_model() == UserOrdered) { + uint32_t const limit = _session->ntracks() + _session->nbusses () + 4; + + HBox* hbox = manage (new HBox); + hbox->set_spacing (6); + hbox->pack_start (*manage (new Label (_("Remote control ID:")))); + spin = manage (new SpinButton); + spin->set_digits (0); + spin->set_increments (1, 10); + spin->set_range (0, limit); + spin->set_value (_route->remote_control_id()); + hbox->pack_start (*spin); + dialog.get_vbox()->pack_start (*hbox); + + dialog.add_button (Stock::CANCEL, RESPONSE_CANCEL); + dialog.add_button (Stock::APPLY, RESPONSE_ACCEPT); + } else { + Label* l = manage (new Label()); + if (_route->is_master() || _route->is_monitor()) { + l->set_markup (string_compose (_("The remote control ID of %1 is: %2\n\n\n" + "The remote control ID of %3 cannot be changed."), + Glib::Markup::escape_text (_route->name()), + _route->remote_control_id(), + (_route->is_master() ? _("the master bus") : _("the monitor bus")))); + } else { + l->set_markup (string_compose (_("The remote control ID of %6 is: %3\n\n\n" + "Remote Control IDs are currently determined by track/bus ordering in %1\n\n" + "%4Use the User Interaction tab of the Preferences window if you want to change this%5"), + (Config->get_remote_model() == MixerOrdered ? _("the mixer") : ("the editor")), + (is_track() ? _("track") : _("bus")), + _route->remote_control_id(), + "", + "", + Glib::Markup::escape_text (_route->name()))); + } + dialog.get_vbox()->pack_start (*l); + dialog.add_button (Stock::OK, RESPONSE_CANCEL); + } dialog.show_all (); int const r = dialog.run (); - if (r == RESPONSE_ACCEPT) { + if (r == RESPONSE_ACCEPT && spin) { _route->set_remote_control_id (spin->get_value_as_int ()); } } @@ -1766,7 +1771,7 @@ void RouteUI::setup_invert_buttons () { /* remove old invert buttons */ - for (list::iterator i = _invert_buttons.begin(); i != _invert_buttons.end(); ++i) { + for (vector::iterator i = _invert_buttons.begin(); i != _invert_buttons.end(); ++i) { _invert_button_box.remove (**i); } @@ -1781,27 +1786,32 @@ RouteUI::setup_invert_buttons () uint32_t const to_add = (N <= _max_invert_buttons) ? N : 1; for (uint32_t i = 0; i < to_add; ++i) { - BindableToggleButton* b = manage (new BindableToggleButton); - b->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_toggled), i, b)); + ArdourButton* b = manage (new ArdourButton); b->signal_button_press_event().connect (sigc::mem_fun (*this, &RouteUI::invert_press)); + b->signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_release), i)); - b->set_name (X_("MixerInvertButton")); + b->set_name (X_("mixer strip button")); if (to_add == 1) { - b->add (*manage (new Label (X_("Ø")))); + if (N > 1) { + b->set_text (string_compose (X_("Ø (%1)"), N)); + } else { + b->set_text (X_("Ø")); + } } else { - b->add (*manage (new Label (string_compose (X_("Ø%1"), i + 1)))); + b->set_text (string_compose (X_("Ø%1"), i + 1)); } - if (N <= 4) { + if (N <= _max_invert_buttons) { UI::instance()->set_tip (*b, string_compose (_("Left-click to invert (phase reverse) channel %1 of this track. Right-click to show menu."), i + 1)); } else { - UI::instance()->set_tip (*b, string_compose (_("Left-click to invert (phase reverse) all channels of this track. Right-click to show menu."), i + 1)); + UI::instance()->set_tip (*b, _("Click to show a menu of channels for inversion (phase reverse)")); } _invert_buttons.push_back (b); _invert_button_box.pack_start (*b); } + _invert_button_box.set_spacing (1); _invert_button_box.show_all (); } @@ -1812,53 +1822,69 @@ RouteUI::set_invert_button_state () uint32_t const N = _route->input()->n_ports().n_audio(); if (N > _max_invert_buttons) { - _invert_buttons.front()->set_active (_route->phase_invert().any()); - --_i_am_the_modifier; - return; - } - int j = 0; - for (list::iterator i = _invert_buttons.begin(); i != _invert_buttons.end(); ++i, ++j) { - (*i)->set_active (_route->phase_invert (j)); + /* One button for many channels; explicit active if all channels are inverted, + implicit active if some are, off if none are. + */ + + ArdourButton* b = _invert_buttons.front (); + + if (_route->phase_invert().count() == _route->phase_invert().size()) { + b->set_active_state (Gtkmm2ext::ExplicitActive); + } else if (_route->phase_invert().any()) { + b->set_active_state (Gtkmm2ext::ImplicitActive); + } else { + b->set_active_state (Gtkmm2ext::Off); + } + + } else { + + /* One button per channel; just set active */ + + int j = 0; + for (vector::iterator i = _invert_buttons.begin(); i != _invert_buttons.end(); ++i, ++j) { + (*i)->set_active (_route->phase_invert (j)); + } + } --_i_am_the_modifier; } -void -RouteUI::invert_toggled (uint32_t i, BindableToggleButton* b) -{ - if (_i_am_the_modifier) { - return; - } - - uint32_t const N = _route->input()->n_ports().n_audio(); - if (N <= _max_invert_buttons) { - _route->set_phase_invert (i, b->get_active ()); - } else { - boost::dynamic_bitset<> p (N); - if (b->get_active ()) { - p.set (); +bool +RouteUI::invert_release (GdkEventButton* ev, uint32_t i) +{ + if (ev->button == 1 && i < _invert_buttons.size()) { + uint32_t const N = _route->input()->n_ports().n_audio (); + if (N <= _max_invert_buttons) { + /* left-click inverts phase so long as we have a button per channel */ + _route->set_phase_invert (i, !_invert_buttons[i]->get_active()); + return true; } - _route->set_phase_invert (p); } + return false; } + bool RouteUI::invert_press (GdkEventButton* ev) { using namespace Menu_Helpers; - if (ev->button != 3) { + uint32_t const N = _route->input()->n_ports().n_audio(); + if (N <= _max_invert_buttons && ev->button != 3) { + /* If we have an invert button per channel, we only pop + up a menu on right-click; left click is handled + on release. + */ return true; } - + delete _invert_menu; _invert_menu = new Menu; _invert_menu->set_name ("ArdourContextMenu"); MenuList& items = _invert_menu->items (); - uint32_t const N = _route->input()->n_ports().n_audio(); for (uint32_t i = 0; i < N; ++i) { items.push_back (CheckMenuElem (string_compose (X_("Ø%1"), i + 1), sigc::bind (sigc::mem_fun (*this, &RouteUI::invert_menu_toggled), i))); CheckMenuItem* e = dynamic_cast (&items.back ()); @@ -1885,7 +1911,7 @@ RouteUI::invert_menu_toggled (uint32_t c) void RouteUI::set_invert_sensitive (bool yn) { - for (list::iterator b = _invert_buttons.begin(); b != _invert_buttons.end(); ++b) { + for (vector::iterator b = _invert_buttons.begin(); b != _invert_buttons.end(); ++b) { (*b)->set_sensitive (yn); } } @@ -1923,3 +1949,28 @@ RouteUI::color () const return _color; } + +void +RouteUI::set_showing_sends_to (boost::shared_ptr send_to) +{ + _showing_sends_to = send_to; + BusSendDisplayChanged (send_to); /* EMIT SIGNAL */ +} + +void +RouteUI::bus_send_display_changed (boost::shared_ptr send_to) +{ + if (_route == send_to) { + show_sends_button->set_active (true); + send_blink_connection = ARDOUR_UI::instance()->Blink.connect (sigc::mem_fun (*this, &RouteUI::send_blink)); + } else { + show_sends_button->set_active (false); + send_blink_connection.disconnect (); + } +} + +RouteGroup* +RouteUI::route_group() const +{ + return _route->route_group(); +}