summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_box.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-12-08 16:07:28 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-12-08 16:07:28 +0000
commit3be16e8afbd891c0bfe7227158384ed0d127597f (patch)
tree73a8f761fc13cbd0613d3923a34748bb9aa761d2 /gtk2_ardour/processor_box.cc
parenta9bb336fc44ab4937978f5a0308e440ed632ea50 (diff)
partial patch/partial by-hand merge of 2.X commits 3169&3170 to 3.X codebase
git-svn-id: svn://localhost/ardour2/branches/3.0@4300 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r--gtk2_ardour/processor_box.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 370bb7548b..88bd7d0b15 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -82,10 +82,9 @@ bool ProcessorBox::get_colors = true;
Gdk::Color* ProcessorBox::active_processor_color;
Gdk::Color* ProcessorBox::inactive_processor_color;
-ProcessorBox::ProcessorBox (Placement pcmnt, Session& sess, boost::shared_ptr<Route> rt, PluginSelector &plugsel,
- RouteRedirectSelection & rsel, bool owner_is_mixer)
- : _route(rt),
- _session(sess),
+ProcessorBox::ProcessorBox (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),
@@ -138,21 +137,10 @@ ProcessorBox::ProcessorBox (Placement pcmnt, Session& sess, boost::shared_ptr<Ro
pack_start (processor_eventbox, true, true);
- _route->processors_changed.connect (mem_fun(*this, &ProcessorBox::redisplay_processors));
- _route->GoingAway.connect (mem_fun (*this, &ProcessorBox::route_going_away));
-
processor_eventbox.signal_enter_notify_event().connect (bind (sigc::ptr_fun (ProcessorBox::enter_box), this));
processor_display.signal_button_press_event().connect (mem_fun(*this, &ProcessorBox::processor_button_press_event), false);
processor_display.signal_button_release_event().connect (mem_fun(*this, &ProcessorBox::processor_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_processors ();
}
ProcessorBox::~ProcessorBox ()
@@ -160,6 +148,19 @@ ProcessorBox::~ProcessorBox ()
}
void
+ProcessorBox::set_route (boost::shared_ptr<Route> r)
+{
+ connections.clear ();
+
+ _route = r;
+
+ connections.push_back (_route->processors_changed.connect (mem_fun(*this, &ProcessorBox::redisplay_processors)));
+ connections.push_back (_route->GoingAway.connect (mem_fun (*this, &ProcessorBox::route_going_away)));
+
+ redisplay_processors ();
+}
+
+void
ProcessorBox::route_going_away ()
{
/* don't keep updating display as processors are deleted */