summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_strip.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-11-20 15:26:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-11-20 15:26:34 +0000
commit8f7f17187770afc8352dad61ca48ff304c734f68 (patch)
tree8877485412c5e1685d777e2660ac69ad1d561d33 /gtk2_ardour/mixer_strip.cc
parent648450781b8e5a39fd89c1a42f34b601c97df0e2 (diff)
make strip-as-GUI-for-send work for metering too ; frame around session summary widget ; tooltip for editor group tabs ; route group dialog name entry is now activatable (return == click on ok)
git-svn-id: svn://localhost/ardour2/branches/3.0@6137 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r--gtk2_ardour/mixer_strip.cc66
1 files changed, 33 insertions, 33 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 876cf86dfb..3c32439c03 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -334,16 +334,8 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
delete output_selector;
output_selector = 0;
- boost::shared_ptr<Send> send;
+ revert_to_default_display ();
- if (_current_delivery && (send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
- send->set_metering (false);
- }
-
- _current_delivery = _route->main_outs ();
-
- panners.set_panner (rt->main_outs()->panner());
- gpm.set_controls (rt, rt->shared_peak_meter(), rt->amp());
processor_box.set_route (rt);
if (set_color_from_route()) {
@@ -1640,46 +1632,54 @@ MixerStrip::switch_io (boost::shared_ptr<Route> target)
return;
}
- boost::shared_ptr<Send> send;
+ boost::shared_ptr<Send> send = _route->internal_send_for (target);
- if (_current_delivery && (send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
- send->set_metering (false);
+ if (send) {
+ show_send (send);
+ } else {
+ revert_to_default_display ();
}
+}
- _current_delivery = _route->internal_send_for (target);
+void
+MixerStrip::drop_send ()
+{
+ boost::shared_ptr<Send> current_send;
- cerr << "internal send from " << _route->name() << " to " << target->name() << " = "
- << _current_delivery << endl;
+ if (_current_delivery && (current_send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
+ current_send->set_metering (false);
+ }
+
+ send_gone_connection.disconnect ();
+
+}
- if (_current_delivery) {
- send = boost::dynamic_pointer_cast<Send>(_current_delivery);
- send->set_metering (true);
- _current_delivery->GoingAway.connect (mem_fun (*this, &MixerStrip::revert_to_default_display));
- gain_meter().set_controls (_route, send->meter(), send->amp());
- panner_ui().set_panner (_current_delivery->panner());
+void
+MixerStrip::show_send (boost::shared_ptr<Send> send)
+{
+ assert (send != 0);
+ drop_send ();
- } else {
- _current_delivery = _route->main_outs ();
- gain_meter().set_controls (_route, _route->shared_peak_meter(), _route->amp());
- panner_ui().set_panner (_route->main_outs()->panner());
- }
+ _current_delivery = send;
+ send->set_metering (true);
+ send_gone_connection = _current_delivery->GoingAway.connect (mem_fun (*this, &MixerStrip::revert_to_default_display));
+ gain_meter().set_controls (_route, send->meter(), send->amp());
gain_meter().setup_meters ();
+
+ panner_ui().set_panner (_current_delivery->panner());
panner_ui().setup_pan ();
}
-
void
MixerStrip::revert_to_default_display ()
{
- show_sends_button->set_active (false);
-
- boost::shared_ptr<Send> send;
-
- if (_current_delivery && (send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
- send->set_metering (false);
+ if (show_sends_button) {
+ show_sends_button->set_active (false);
}
+ drop_send ();
+
_current_delivery = _route->main_outs();
gain_meter().set_controls (_route, _route->shared_peak_meter(), _route->amp());