summaryrefslogtreecommitdiff
path: root/gtk2_ardour/redirect_box.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-10-05 15:36:45 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-10-05 15:36:45 +0000
commitb462493f44d9004853a6d242ae295496af12478c (patch)
tree66f8a04b9fcc9c7083d33ecfb4915b94dfbfc770 /gtk2_ardour/redirect_box.cc
parentf138091f7e6413623390cd2168aaac7d0a7d71c2 (diff)
make RouteUI and its children and relations able to switch the Route/IO object they refer to (significant architectural changes)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3869 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/redirect_box.cc')
-rw-r--r--gtk2_ardour/redirect_box.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc
index 037123d169..de84a07db8 100644
--- a/gtk2_ardour/redirect_box.cc
+++ b/gtk2_ardour/redirect_box.cc
@@ -83,10 +83,9 @@ bool RedirectBox::get_colors = true;
Gdk::Color* RedirectBox::active_redirect_color;
Gdk::Color* RedirectBox::inactive_redirect_color;
-RedirectBox::RedirectBox (Placement pcmnt, Session& sess, boost::shared_ptr<Route> rt, PluginSelector &plugsel,
- RouteRedirectSelection & rsel, bool owner_is_mixer)
- : _route(rt),
- _session(sess),
+RedirectBox::RedirectBox (Placement pcmnt, Session& sess, PluginSelector &plugsel,
+ RouteRedirectSelection& rsel, bool owner_is_mixer)
+ : _session(sess),
_owner_is_mixer (owner_is_mixer),
_placement(pcmnt),
_plugin_selector(plugsel),
@@ -139,21 +138,10 @@ RedirectBox::RedirectBox (Placement pcmnt, Session& sess, boost::shared_ptr<Rout
pack_start (redirect_eventbox, true, true);
- _route->redirects_changed.connect (mem_fun(*this, &RedirectBox::redisplay_redirects));
- _route->GoingAway.connect (mem_fun (*this, &RedirectBox::route_going_away));
-
redirect_eventbox.signal_enter_notify_event().connect (bind (sigc::ptr_fun (RedirectBox::enter_box), this));
redirect_display.signal_button_press_event().connect (mem_fun(*this, &RedirectBox::redirect_button_press_event), false);
redirect_display.signal_button_release_event().connect (mem_fun(*this, &RedirectBox::redirect_button_release_event));
-
- /* start off as a passthru strip. we'll correct this, if necessary,
- in update_diskstream_display().
- */
-
- /* now force an update of all the various elements */
-
- redisplay_redirects (0);
}
RedirectBox::~RedirectBox ()
@@ -161,6 +149,19 @@ RedirectBox::~RedirectBox ()
}
void
+RedirectBox::set_route (boost::shared_ptr<Route> r)
+{
+ connections.clear ();
+
+ _route = r;
+
+ connections.push_back (_route->redirects_changed.connect (mem_fun(*this, &RedirectBox::redisplay_redirects)));
+ connections.push_back (_route->GoingAway.connect (mem_fun (*this, &RedirectBox::route_going_away)));
+
+ redisplay_redirects (0);
+}
+
+void
RedirectBox::route_going_away ()
{
/* don't keep updating display as redirects are deleted */