+
+bool
+MonitorSection::cancel_isolate (GdkEventButton* ev)
+{
+ if (_session) {
+ boost::shared_ptr<RouteList> rl (_session->get_routes ());
+ _session->set_solo_isolated (rl, false, Session::rt_cleanup, true);
+ }
+
+ return true;
+}
+
+bool
+MonitorSection::cancel_audition (GdkEventButton* ev)
+{
+ if (_session) {
+ _session->cancel_audition();
+ }
+ return true;
+}
+
+void
+MonitorSection::solo_cut_changed ()
+{
+ Config->set_solo_mute_gain (slider_position_to_gain (solo_cut_adjustment.get_value()));
+}
+
+void
+MonitorSection::parameter_changed (std::string name)
+{
+ if (name == "solo-control-is-listen-control" ||
+ name == "listen-position") {
+ update_solo_model ();
+ } else if (name == "solo-mute-gain") {
+ solo_cut_adjustment.set_value (gain_to_slider_position (Config->get_solo_mute_gain()));
+ }
+}
+
+void
+MonitorSection::assign_controllables ()
+{
+ boost::shared_ptr<Controllable> none;
+
+ if (!gain_control) {
+ /* too early - GUI controls not set up yet */
+ return;
+ }
+
+ if (_route) {
+ gain_control->set_controllable (_route->gain_control());
+ control_link (control_connections, _route->gain_control(), gain_adjustment);
+ } else {
+ gain_control->set_controllable (none);
+ }
+
+ if (_monitor) {
+
+ cut_all_button.set_controllable (_monitor->cut_control());
+ cut_all_button.watch ();
+ dim_all_button.set_controllable (_monitor->dim_control());
+ dim_all_button.watch ();
+ mono_button.set_controllable (_monitor->mono_control());
+ mono_button.watch ();
+
+ boost::shared_ptr<Controllable> c (_monitor->dim_level_control ());
+
+ dim_control->set_controllable (c);
+ dim_adjustment.set_lower (c->lower());
+ dim_adjustment.set_upper (c->upper());
+ control_link (control_connections, c, dim_adjustment);
+
+ c = _monitor->solo_boost_control ();
+ solo_boost_control->set_controllable (c);
+ solo_boost_adjustment.set_lower (c->lower());
+ solo_boost_adjustment.set_upper (c->upper());
+ control_link (control_connections, c, solo_boost_adjustment);
+
+ } else {
+
+ cut_all_button.set_controllable (none);
+ dim_all_button.set_controllable (none);
+ mono_button.set_controllable (none);
+
+ dim_control->set_controllable (none);
+ solo_boost_control->set_controllable (none);
+ }
+}