diff options
Diffstat (limited to 'gtk2_ardour')
113 files changed, 371 insertions, 350 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index f97d892c4c..7deeae7bf7 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -234,20 +234,20 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) last_shuttle_request = last_peak_grab = 0; // get_microseconds(); - ARDOUR::Diskstream::DiskOverrun.connect (sigc::mem_fun(*this, &ARDOUR_UI::disk_overrun_handler)); - ARDOUR::Diskstream::DiskUnderrun.connect (sigc::mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); + ARDOUR::Diskstream::DiskOverrun.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::disk_overrun_handler)); + ARDOUR::Diskstream::DiskUnderrun.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::disk_underrun_handler)); /* handle dialog requests */ - ARDOUR::Session::Dialog.connect (sigc::mem_fun(*this, &ARDOUR_UI::session_dialog)); + ARDOUR::Session::Dialog.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::session_dialog)); /* handle pending state with a dialog */ - ARDOUR::Session::AskAboutPendingState.connect (sigc::mem_fun(*this, &ARDOUR_UI::pending_state_dialog)); + ARDOUR::Session::AskAboutPendingState.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::pending_state_dialog)); /* handle sr mismatch with a dialog */ - ARDOUR::Session::AskAboutSampleRateMismatch.connect (sigc::mem_fun(*this, &ARDOUR_UI::sr_mismatch_dialog)); + ARDOUR::Session::AskAboutSampleRateMismatch.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::sr_mismatch_dialog)); /* lets get this party started */ @@ -329,10 +329,10 @@ ARDOUR_UI::create_engine () return -1; } - engine->Stopped.connect (sigc::mem_fun(*this, &ARDOUR_UI::engine_stopped)); - engine->Running.connect (sigc::mem_fun(*this, &ARDOUR_UI::engine_running)); - engine->Halted.connect (sigc::mem_fun(*this, &ARDOUR_UI::engine_halted)); - engine->SampleRateChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::update_sample_rate)); + engine->Stopped.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::engine_stopped)); + engine->Running.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::engine_running)); + engine->Halted.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::engine_halted)); + engine->SampleRateChanged.connect (forever_connections, sigc::mem_fun(*this, &ARDOUR_UI::update_sample_rate)); post_engine (); @@ -407,7 +407,7 @@ ARDOUR_UI::post_engine () update_cpu_load (); update_sample_rate (engine->frame_rate()); - Config->ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed)); + Config->ParameterChanged.connect (forever_connections, sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed)); boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); Config->map_parameters (pc); diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index d14aa7ce0c..318d189251 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -694,6 +694,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr void platform_specific (); void platform_setup (); void fontconfig_dialog (); + + PBD::ScopedConnectionList forever_connections; }; #endif /* __ardour_gui_h__ */ diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 87a8dede29..7cbf0df3e2 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -113,15 +113,14 @@ ARDOUR_UI::set_session (Session *s) Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::sync_blink)); Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::audition_blink)); - _session_connections.add_connection (_session->Xrun.connect (sigc::mem_fun(*this, &ARDOUR_UI::xrun_handler))); - _session_connections.add_connection (_session->RecordStateChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::record_state_changed))); - _session_connections.add_connection (_session->locations()->added.connect (sigc::mem_fun (*this, &ARDOUR_UI::handle_locations_change))); - _session_connections.add_connection (_session->locations()->removed.connect (sigc::mem_fun (*this, &ARDOUR_UI::handle_locations_change))); - _session_connections.add_connection (_session->TransportStateChange.connect (sigc::mem_fun(*this, &ARDOUR_UI::map_transport_state))); - _session_connections.add_connection (_session->AuditionActive.connect (sigc::mem_fun(*this, &ARDOUR_UI::auditioning_changed))); - _session_connections.add_connection (_session->SoloActive.connect (sigc::mem_fun(*this, &ARDOUR_UI::soloing_changed))); - _session_connections.add_connection (_session->DirtyChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::update_autosave))); - + _session->Xrun.connect (_session_connections, sigc::mem_fun(*this, &ARDOUR_UI::xrun_handler)); + _session->RecordStateChanged.connect (_session_connections, sigc::mem_fun (*this, &ARDOUR_UI::record_state_changed)); + _session->locations()->added.connect (_session_connections, sigc::mem_fun (*this, &ARDOUR_UI::handle_locations_change)); + _session->locations()->removed.connect (_session_connections, sigc::mem_fun (*this, &ARDOUR_UI::handle_locations_change)); + _session->TransportStateChange.connect (_session_connections, sigc::mem_fun(*this, &ARDOUR_UI::map_transport_state)); + _session->AuditionActive.connect (_session_connections, sigc::mem_fun(*this, &ARDOUR_UI::auditioning_changed)); + _session->SoloActive.connect (_session_connections, sigc::mem_fun(*this, &ARDOUR_UI::soloing_changed)); + _session->DirtyChanged.connect (_session_connections, sigc::mem_fun(*this, &ARDOUR_UI::update_autosave)); /* Clocks are on by default after we are connected to a session, so show that here. */ diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 20d492c71b..f917fd429d 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -270,7 +270,7 @@ ARDOUR_UI::toggle_editing_space() void ARDOUR_UI::setup_session_options () { - _session->config.ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed)); + _session->config.ParameterChanged.connect (_session_connections, sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed)); boost::function<void (std::string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); _session->config.map_parameters (pc); } diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index c37c6cab9c..0847031df4 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -214,7 +214,7 @@ AudioClock::AudioClock (std::string clock_name, bool transient, std::string widg clock_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::SCROLL_MASK); clock_base.signal_button_release_event().connect (sigc::bind (sigc::mem_fun (*this, &AudioClock::field_button_release_event), Timecode_Hours)); - Session::TimecodeOffsetChanged.connect (sigc::mem_fun (*this, &AudioClock::timecode_offset_changed)); + Session::TimecodeOffsetChanged.connect (_session_connections, sigc::mem_fun (*this, &AudioClock::timecode_offset_changed)); if (editable) { setup_events (); diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc index 2c26f562ff..c95ecc5616 100644 --- a/gtk2_ardour/audio_region_editor.cc +++ b/gtk2_ardour/audio_region_editor.cc @@ -155,7 +155,7 @@ AudioRegionEditor::AudioRegionEditor (Session* s, boost::shared_ptr<AudioRegion> bounds_changed (Change (StartChanged|LengthChanged|PositionChanged|Region::SyncOffsetChanged)); gain_changed (); - _region->StateChanged.connect (sigc::mem_fun(*this, &AudioRegionEditor::region_changed)); + _region->StateChanged.connect (state_connection, sigc::mem_fun(*this, &AudioRegionEditor::region_changed)); spin_arrow_grab = false; @@ -228,7 +228,7 @@ AudioRegionEditor::connect_editor_events () gain_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &AudioRegionEditor::gain_adjustment_changed)); audition_button.signal_toggled().connect (sigc::mem_fun(*this, &AudioRegionEditor::audition_button_toggled)); - _session->AuditionActive.connect (sigc::mem_fun(*this, &AudioRegionEditor::audition_state_changed)); + _session->AuditionActive.connect (audition_connection, sigc::mem_fun(*this, &AudioRegionEditor::audition_state_changed)); } void diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h index f4c99917d8..0450d0c293 100644 --- a/gtk2_ardour/audio_region_editor.h +++ b/gtk2_ardour/audio_region_editor.h @@ -35,7 +35,8 @@ #include <gtkmm/spinbutton.h> #include <libgnomecanvas/libgnomecanvas.h> -#include <sigc++/signal.h> + +#include "pbd/signals.h" #include "audio_clock.h" #include "ardour_dialog.h" @@ -94,6 +95,9 @@ class AudioRegionEditor : public RegionEditor Gtk::VSeparator sep1; Gtk::VSeparator sep2; + PBD::ScopedConnection state_connection; + PBD::ScopedConnection audition_connection; + void region_changed (ARDOUR::Change); void bounds_changed (ARDOUR::Change); void name_changed (); diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 30c426567f..3713242101 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1186,7 +1186,7 @@ AudioRegionView::add_ghost (TimeAxisView& tv) ghost->set_colors(); ghosts.push_back (ghost); - ghost->GoingAway.connect (boost::bind (&RegionView::remove_ghost, this, _1)); + ghost->GoingAway.connect (*this, boost::bind (&RegionView::remove_ghost, this, _1)); return ghost; } diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index 85ea02a197..6fb481db2d 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -66,7 +66,7 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv) use_rec_regions = tv.editor().show_waveforms_recording (); - Config->ParameterChanged.connect (sigc::mem_fun (*this, &AudioStreamView::parameter_changed)); + Config->ParameterChanged.connect (*this, sigc::mem_fun (*this, &AudioStreamView::parameter_changed)); } AudioStreamView::~AudioStreamView () @@ -190,7 +190,7 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wai /* catch region going away */ - scoped_connect (r->GoingAway, boost::bind (&AudioStreamView::remove_region_view, this, boost::weak_ptr<Region> (r))); + r->GoingAway.connect (*this, boost::bind (&AudioStreamView::remove_region_view, this, boost::weak_ptr<Region> (r))); RegionViewAdded (region_view); @@ -281,12 +281,14 @@ AudioStreamView::playlist_changed (boost::shared_ptr<Diskstream> ds) { ENSURE_GUI_THREAD (*this, &AudioStreamView::playlist_changed_weak, boost::weak_ptr<Diskstream> (ds)); + playlist_connections.drop_connections (); + StreamView::playlist_changed(ds); boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>(ds->playlist()); if (apl) { - playlist_connections.add_connection (apl->NewCrossfade.connect (boost::bind (&AudioStreamView::add_crossfade, this, _1))); + apl->NewCrossfade.connect (playlist_connections, boost::bind (&AudioStreamView::add_crossfade, this, _1)); } } @@ -345,7 +347,7 @@ AudioStreamView::add_crossfade (boost::shared_ptr<Crossfade> crossfade) region_color, *lview, *rview); cv->set_valid (true); - crossfade->Invalidated.connect (sigc::mem_fun (*this, &AudioStreamView::remove_crossfade)); + crossfade->Invalidated.connect (*this, sigc::mem_fun (*this, &AudioStreamView::remove_crossfade)); crossfade_views[cv->crossfade] = cv; if (!_trackview.session()->config.get_xfades_visible() || !crossfades_visible) { cv->hide (); @@ -481,9 +483,9 @@ AudioStreamView::setup_rec_box () if (src) { sources.push_back (src); - rec_data_ready_connections.add_connection - (src->PeakRangeReady.connect - (boost::bind (&AudioStreamView::rec_peak_range_ready, this, _1, _2, boost::weak_ptr<Source>(src)))); + (src->PeakRangeReady.connect (rec_data_ready_connections, + boost::bind (&AudioStreamView::rec_peak_range_ready, + this, _1, _2, boost::weak_ptr<Source>(src)))); } } diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 040e56a323..0105e1846c 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -108,9 +108,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session* sess, boost::sh } if (_route->panner()) { - _route->panner()->Changed.connect (sigc::bind ( - sigc::mem_fun(*this, &AudioTimeAxisView::ensure_pan_views), - false)); + _route->panner()->Changed.connect (*this, (boost::bind (&AudioTimeAxisView::ensure_pan_views, this, false))); } /* map current state of the route */ diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 08b3f001cd..ba08024161 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -54,7 +54,7 @@ AutomationController::AutomationController(boost::shared_ptr<AutomationControl> _screen_update_connection = ARDOUR_UI::RapidScreenUpdate.connect ( sigc::mem_fun (*this, &AutomationController::display_effective_value)); - ac->Changed.connect (sigc::mem_fun(*this, &AutomationController::value_changed)); + ac->Changed.connect (_changed_connection, sigc::mem_fun(*this, &AutomationController::value_changed)); } AutomationController::~AutomationController() diff --git a/gtk2_ardour/automation_controller.h b/gtk2_ardour/automation_controller.h index 05170b2a6b..e6d377ab26 100644 --- a/gtk2_ardour/automation_controller.h +++ b/gtk2_ardour/automation_controller.h @@ -23,7 +23,9 @@ #include <boost/shared_ptr.hpp> #include <gtkmm.h> -#include <gtkmm2ext/barcontroller.h> + +#include "gtkmm2ext/barcontroller.h" +#include "pbd/signals.h" namespace ARDOUR { class Session; @@ -63,6 +65,7 @@ private: boost::shared_ptr<ARDOUR::AutomationControl> _controllable; Gtk::Adjustment* _adjustment; sigc::connection _screen_update_connection; + PBD::ScopedConnection _changed_connection; }; diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 7f9bd6b455..726de984a0 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -85,7 +85,7 @@ AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanv line->signal_event().connect (sigc::mem_fun (*this, &AutomationLine::event_handler)); - alist->StateChanged.connect (sigc::mem_fun(*this, &AutomationLine::list_changed)); + alist->StateChanged.connect (_state_connection, boost::bind (&AutomationLine::list_changed, this)); trackview.session()->register_with_memento_command_factory(alist->id(), this); diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index c16bf60008..e3e185bf72 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -171,6 +171,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible void reset_callback (const Evoral::ControlList&); void list_changed (); + PBD::ScopedConnection _state_connection; virtual bool event_handler (GdkEvent*); virtual void add_model_point (ALPoints& tmp_points, double frame, double yfract); diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index 9056adc693..bcb6376027 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -59,7 +59,7 @@ AutomationRegionView::init (Gdk::Color const & basic_color, bool /*wfd*/) set_height (trackview.current_height()); - _region->StateChanged.connect (sigc::mem_fun(*this, &AutomationRegionView::region_changed)); + _region->StateChanged.connect (*this, boost::bind (&RegionView::region_changed, this, _1)); set_colors (); diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc index 9c7cf50ac7..731374eb2d 100644 --- a/gtk2_ardour/automation_streamview.cc +++ b/gtk2_ardour/automation_streamview.cc @@ -129,7 +129,7 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region display_region(region_view); /* catch regionview going away */ - scoped_connect (region->GoingAway, boost::bind (&AutomationStreamView::remove_region_view, this, boost::weak_ptr<Region>(region))); + region->GoingAway.connect (*this, boost::bind (&AutomationStreamView::remove_region_view, this, boost::weak_ptr<Region>(region))); RegionViewAdded (region_view); diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index aee9b70726..fa507448b4 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -833,8 +833,7 @@ AutomationTimeAxisView::add_line (boost::shared_ptr<AutomationLine> line) assert(!_line); assert(line->the_list() == _control->list()); - automation_connection = _control->alist()->automation_state_changed.connect - (boost::bind (&AutomationTimeAxisView::automation_state_changed, this)); + _control->alist()->automation_state_changed.connect (automation_connection, boost::bind (&AutomationTimeAxisView::automation_state_changed, this)); _line = line; //_controller = AutomationController::create(_session, line->the_list(), _control); diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc index ca047ebea0..9b4b2b6bde 100644 --- a/gtk2_ardour/bundle_manager.cc +++ b/gtk2_ardour/bundle_manager.cc @@ -395,7 +395,7 @@ BundleManager::add_bundle (boost::shared_ptr<Bundle> b) (*i)[_list_model_columns.name] = u->name (); (*i)[_list_model_columns.bundle] = u; - u->Changed.connect (sigc::bind (sigc::mem_fun (*this, &BundleManager::bundle_changed), u)); + u->Changed.connect (bundle_connections, boost::bind (&BundleManager::bundle_changed, this, _1, u)); } void diff --git a/gtk2_ardour/bundle_manager.h b/gtk2_ardour/bundle_manager.h index d064e40bf6..4172330cf1 100644 --- a/gtk2_ardour/bundle_manager.h +++ b/gtk2_ardour/bundle_manager.h @@ -117,6 +117,7 @@ class BundleManager : public ArdourDialog ModelColumns _list_model_columns; Gtk::Button edit_button; Gtk::Button delete_button; + PBD::ScopedConnectionList bundle_connections; }; class NameChannelDialog : public ArdourDialog diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc index 7a7b740a25..afb595938d 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -291,9 +291,9 @@ CrossfadeEditor::CrossfadeEditor (Session* s, boost::shared_ptr<Crossfade> xf, d curve_select_clicked (In); - xfade->StateChanged.connect (sigc::mem_fun(*this, &CrossfadeEditor::xfade_changed)); + xfade->StateChanged.connect (state_connection, boost::bind (&CrossfadeEditor::xfade_changed, this, _1)); - _session_connections.add_connection (_session->AuditionActive.connect (sigc::mem_fun(*this, &CrossfadeEditor::audition_state_changed))); + _session->AuditionActive.connect (_session_connections, sigc::mem_fun(*this, &CrossfadeEditor::audition_state_changed)); show_all_children(); } diff --git a/gtk2_ardour/crossfade_edit.h b/gtk2_ardour/crossfade_edit.h index 7334002abd..29a66b3747 100644 --- a/gtk2_ardour/crossfade_edit.h +++ b/gtk2_ardour/crossfade_edit.h @@ -183,7 +183,8 @@ class CrossfadeEditor : public ArdourDialog void set (const ARDOUR::AutomationList& alist, WhichFade); - boost::signals2::scoped_connection peaks_ready_connection; + PBD::ScopedConnection peaks_ready_connection; + PBD::ScopedConnection state_connection; void make_waves (boost::shared_ptr<ARDOUR::AudioRegion>, WhichFade); void peaks_ready (boost::weak_ptr<ARDOUR::AudioRegion> r, WhichFade); diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc index 63868ca895..3a34ace7fa 100644 --- a/gtk2_ardour/crossfade_view.cc +++ b/gtk2_ardour/crossfade_view.cc @@ -39,7 +39,7 @@ using namespace Editing; using namespace Gnome; using namespace Canvas; -boost::signals2::signal<void(CrossfadeView*)> CrossfadeView::GoingAway; +PBD::Signal1<void,CrossfadeView*> CrossfadeView::GoingAway; CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv, @@ -83,7 +83,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent, crossfade_changed (Change (~0)); - crossfade->StateChanged.connect (sigc::mem_fun(*this, &CrossfadeView::crossfade_changed)); + crossfade->StateChanged.connect (*this, sigc::mem_fun(*this, &CrossfadeView::crossfade_changed)); ColorsChanged.connect (sigc::mem_fun (*this, &CrossfadeView::color_handler)); } diff --git a/gtk2_ardour/crossfade_view.h b/gtk2_ardour/crossfade_view.h index a82387393f..8e8c50e323 100644 --- a/gtk2_ardour/crossfade_view.h +++ b/gtk2_ardour/crossfade_view.h @@ -22,7 +22,7 @@ #include <vector> #include <libgnomecanvasmm.h> -#include <boost/signals2.hpp> +#include "pbd/signals.h" #include "ardour/crossfade.h" #include "time_axis_view_item.h" @@ -52,7 +52,7 @@ struct CrossfadeView : public TimeAxisViewItem bool visible() const { return _visible; } void set_valid (bool yn); - static boost::signals2::signal<void(CrossfadeView*)> GoingAway; + static PBD::Signal1<void,CrossfadeView*> GoingAway; AudioRegionView& upper_regionview () const; diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 7cc9e26339..57d1ef0922 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -627,7 +627,7 @@ Editor::Editor () _playlist_selector = new PlaylistSelector(); _playlist_selector->signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (_playlist_selector))); - scoped_connect (RegionView::RegionViewGoingAway, boost::bind (&Editor::catch_vanishing_regionview, this, _1)); + RegionView::RegionViewGoingAway.connect (*this, boost::bind (&Editor::catch_vanishing_regionview, this, _1)); /* nudge stuff */ @@ -677,13 +677,13 @@ Editor::Editor () /* allow external control surfaces/protocols to do various things */ - ControlProtocol::ZoomToSession.connect (sigc::mem_fun (*this, &Editor::temporal_zoom_session)); - ControlProtocol::ZoomIn.connect (sigc::bind (sigc::mem_fun (*this, &Editor::temporal_zoom_step), false)); - ControlProtocol::ZoomOut.connect (sigc::bind (sigc::mem_fun (*this, &Editor::temporal_zoom_step), true)); - ControlProtocol::ScrollTimeline.connect (sigc::mem_fun (*this, &Editor::control_scroll)); - BasicUI::AccessAction.connect (sigc::mem_fun (*this, &Editor::access_action)); + ControlProtocol::ZoomToSession.connect (*this, boost::bind (&Editor::temporal_zoom_session, this)); + ControlProtocol::ZoomIn.connect (*this, boost::bind (&Editor::temporal_zoom_step, this, false)); + ControlProtocol::ZoomOut.connect (*this, boost::bind (&Editor::temporal_zoom_step, this, true)); + ControlProtocol::ScrollTimeline.connect (*this, boost::bind (&Editor::control_scroll, this, _1)); + BasicUI::AccessAction.connect (*this, boost::bind (&Editor::access_action, this, _1, _2)); - Config->ParameterChanged.connect (sigc::mem_fun (*this, &Editor::parameter_changed)); + Config->ParameterChanged.connect (*this, boost::bind (&Editor::parameter_changed, this, _1)); _last_normalization_value = 0; @@ -1075,24 +1075,24 @@ Editor::set_session (Session *t) update_title (); - _session_connections.add_connection (_session->history().Changed.connect (boost::bind (&Editor::history_changed, this))); + _session->history().Changed.connect (_session_connections, boost::bind (&Editor::history_changed, this)); /* These signals can all be emitted by a non-GUI thread. Therefore the handlers for them must not attempt to directly interact with the GUI, but use Gtkmm2ext::UI::instance()->call_slot(); */ - _session_connections.add_connection (_session->TransportStateChange.connect (boost::bind (&Editor::map_transport_state, this))); - _session_connections.add_connection (_session->PositionChanged.connect (boost::bind (&Editor::map_position_change, this, _1))); - _session_connections.add_connection (_session->RouteAdded.connect (boost::bind (&Editor::handle_new_route, this, _1))); - _session_connections.add_connection (_session->DurationChanged.connect (boost::bind (&Editor::handle_new_duration, this))); - _session_connections.add_connection (_session->DirtyChanged.connect (boost::bind (&Editor::update_title, this))); - _session_connections.add_connection (_session->StateSaved.connect (boost::bind (&Editor::update_title, this))); - _session_connections.add_connection (_session->AskAboutPlaylistDeletion.connect (boost::bind (&Editor::playlist_deletion_dialog, this, _1))); - _session_connections.add_connection (_session->TimecodeOffsetChanged.connect (boost::bind (&Editor::update_just_timecode, this))); - _session_connections.add_connection (_session->tempo_map().StateChanged.connect (boost::bind (&Editor::tempo_map_changed, this, _1))); - _session_connections.add_connection (_session->Located.connect (boost::bind (&Editor::located, this))); - _session_connections.add_connection (_session->config.ParameterChanged.connect (boost::bind (&Editor::parameter_changed, this, _1))); + _session->TransportStateChange.connect (_session_connections, boost::bind (&Editor::map_transport_state, this)); + _session->PositionChanged.connect (_session_connections, boost::bind (&Editor::map_position_change, this, _1)); + _session->RouteAdded.connect (_session_connections, boost::bind (&Editor::handle_new_route, this, _1)); + _session->DurationChanged.connect (_session_connections, boost::bind (&Editor::handle_new_duration, this)); + _session->DirtyChanged.connect (_session_connections, boost::bind (&Editor::update_title, this)); + _session->StateSaved.connect (_session_connections, boost::bind (&Editor::update_title, this)); + _session->AskAboutPlaylistDeletion.connect (_session_connections, boost::bind (&Editor::playlist_deletion_dialog, this, _1)); + _session->TimecodeOffsetChanged.connect (_session_connections, boost::bind (&Editor::update_just_timecode, this)); + _session->tempo_map().StateChanged.connect (_session_connections, boost::bind (&Editor::tempo_map_changed, this, _1)); + _session->Located.connect (_session_connections, boost::bind (&Editor::located, this)); + _session->config.ParameterChanged.connect (_session_connections, boost::bind (&Editor::parameter_changed, this, _1)); if (Profile->get_sae()) { BBT_Time bbt; @@ -1144,13 +1144,13 @@ Editor::set_session (Session *t) /* static signal - no need to drop connection when session is deleted (XXX or we are?)*/ - _session->StateSaved.connect (sigc::mem_fun(*this, &Editor::session_state_saved)); + _session->StateSaved.connect (*this, boost::bind (&Editor::session_state_saved, this, _1)); - _session_connections.add_connection (_session->locations()->added.connect (sigc::mem_fun(*this, &Editor::add_new_location))); - _session_connections.add_connection (_session->locations()->removed.connect (sigc::mem_fun(*this, &Editor::location_gone))); - _session_connections.add_connection (_session->locations()->changed.connect (sigc::mem_fun(*this, &Editor::refresh_location_display))); - _session_connections.add_connection (_session->locations()->StateChanged.connect (sigc::mem_fun(*this, &Editor::refresh_location_display_s))); - _session_connections.add_connection (_session->locations()->end_location()->changed.connect (sigc::mem_fun(*this, &Editor::end_location_changed))); + _session->locations()->added.connect (_session_connections, sigc::mem_fun(*this, &Editor::add_new_location)); + _session->locations()->removed.connect (_session_connections, sigc::mem_fun(*this, &Editor::location_gone)); + _session->locations()->changed.connect (_session_connections, sigc::mem_fun(*this, &Editor::refresh_location_display)); + _session->locations()->StateChanged.connect (_session_connections, sigc::mem_fun(*this, &Editor::refresh_location_display_s)); + _session->locations()->end_location()->changed.connect (_session_connections, sigc::mem_fun(*this, &Editor::end_location_changed)); handle_new_duration (); @@ -3136,26 +3136,6 @@ Editor::State::~State () } void -Editor::store_state (State& state) const -{ - *state.selection = *selection; -} - -void -Editor::restore_state (State *state) -{ - if (*selection == *state->selection) { - return; - } - - *selection = *state->selection; - time_selection_changed (); - region_selection_changed (); - - /* XXX other selection change handlers? */ -} - -void Editor::begin_reversible_command (string name) { if (_session) { @@ -4829,7 +4809,7 @@ Editor::handle_new_route (RouteList& routes) rtv->view()->RegionViewAdded.connect (sigc::mem_fun (*this, &Editor::region_view_added)); rtv->view()->HeightChanged.connect (sigc::mem_fun (*this, &Editor::streamview_height_changed)); - scoped_connect (rtv->GoingAway, boost::bind (&Editor::remove_route, this, rtv)); + rtv->GoingAway.connect (*this, boost::bind (&Editor::remove_route, this, rtv)); } _routes->routes_added (new_views); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index a29df6ebb6..e3cf417fa0 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -46,7 +46,7 @@ #include <gtkmm2ext/dndtreeview.h> #include "pbd/stateful.h" -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/import_status.h" #include "ardour/tempo.h" @@ -154,7 +154,7 @@ struct EditorCursor { void set_length (double units); void set_y_axis (double position); - sigc::signal<void, nframes64_t> PositionChanged; + PBD::Signal1<void, nframes64_t> PositionChanged; }; class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr @@ -1756,9 +1756,6 @@ public: ~State (); }; - void store_state (State&) const; - void restore_state (State *); - void instant_save (); boost::shared_ptr<ARDOUR::AudioRegion> last_audition_region; diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index bd97d42b4b..4f864309f9 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -237,7 +237,7 @@ RegionDrag::RegionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<Re _primary (p), _views (v) { - death_connection = RegionView::RegionViewGoingAway.connect (sigc::mem_fun (*this, &RegionDrag::region_going_away)); + RegionView::RegionViewGoingAway.connect (death_connection, boost::bind (&RegionDrag::region_going_away, this, _1)); } void diff --git a/gtk2_ardour/editor_imageframe.cc b/gtk2_ardour/editor_imageframe.cc index 705c68586c..7f499c0c6f 100644 --- a/gtk2_ardour/editor_imageframe.cc +++ b/gtk2_ardour/editor_imageframe.cc @@ -1092,7 +1092,7 @@ Editor::handle_new_imageframe_time_axis_view(const string & track_name, void* sr row[route_display_columns.tv] = iftav; route_list_display.get_selection()->select (row); - scoped_connect (iftav->GoingAway, boost::bind (&Editor::remove_route, this, (TimeAxisView*)iftav)); + iftav->GoingAway.connect (*this, boost::bind (&Editor::remove_route, this, (TimeAxisView*)iftav)); iftav->gui_changed.connect(sigc::mem_fun(*this, &Editor::handle_gui_changes)) ; } @@ -1109,7 +1109,7 @@ Editor::handle_new_imageframe_marker_time_axis_view(const string & track_name, T row[route_display_columns.tv] = mta; route_list_display.get_selection()->select (row); - scoped_connect (mta->GoingAway, boost::bind (&Editor::remove_route, this, (TimeAxisView*)mta)); + mta->GoingAway.connect (*this, boost::bind (&Editor::remove_route, this, (TimeAxisView*)mta)); } diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 4d9828a14d..dbee2fb9d2 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -123,11 +123,11 @@ Editor::add_new_location (Location *location) lam->show (); } - location->start_changed.connect (sigc::mem_fun(*this, &Editor::location_changed)); - location->end_changed.connect (sigc::mem_fun(*this, &Editor::location_changed)); - location->changed.connect (sigc::mem_fun(*this, &Editor::location_changed)); - location->name_changed.connect (sigc::mem_fun(*this, &Editor::location_changed)); - location->FlagsChanged.connect (sigc::mem_fun(*this, &Editor::location_flags_changed)); + location->start_changed.connect (*this, boost::bind (&Editor::location_changed, this, _1)); + location->end_changed.connect (*this, boost::bind (&Editor::location_changed, this, _1)); + location->changed.connect (*this, boost::bind (&Editor::location_changed, this, _1)); + location->name_changed.connect (*this, boost::bind (&Editor::location_changed, this, _1)); + location->FlagsChanged.connect (*this, boost::bind (&Editor::location_flags_changed, this, _1, _2)); pair<Location*,LocationMarkers*> newpair; diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 9decef5a21..6cb6046006 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -168,7 +168,7 @@ Editor::create_editor_mixer () _session, false); current_mixer_strip->Hiding.connect (sigc::mem_fun(*this, &Editor::current_mixer_strip_hidden)); - scoped_connect (current_mixer_strip->GoingAway, boost::bind (&Editor::current_mixer_strip_removed, this)); + current_mixer_strip->GoingAway.connect (*this, boost::bind (&Editor::current_mixer_strip_removed, this)); #ifdef GTKOSX current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*this, &Editor::ensure_all_elements_drawn)); #endif diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index 2501f93726..26ae2f6f50 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -125,7 +125,7 @@ EditorRegions::EditorRegions (Editor* e) //ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &Editor::redisplay_regions)); ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::update_all_rows)); - ARDOUR::Region::RegionPropertyChanged.connect (sigc::mem_fun(*this, &EditorRegions::update_row)); + ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, sigc::mem_fun(*this, &EditorRegions::update_row)); } @@ -135,9 +135,9 @@ EditorRegions::set_session (ARDOUR::Session* s) EditorComponent::set_session (s); if (_session) { - _session_connections.add_connection (_session->RegionsAdded.connect (boost::bind (&EditorRegions::handle_new_regions, this, _1))); - _session_connections.add_connection (_session->RegionRemoved.connect (boost::bind (&EditorRegions::handle_region_removed, this, _1))); - _session_connections.add_connection (_session->RegionHiddenChange.connect (boost::bind (&EditorRegions::region_hidden, this, _1))); + _session->RegionsAdded.connect (_session_connections, boost::bind (&EditorRegions::handle_new_regions, this, _1)); + _session->RegionRemoved.connect (_session_connections, boost::bind (&EditorRegions::handle_region_removed, this, _1)); + _session->RegionHiddenChange.connect (_session_connections, boost::bind (&EditorRegions::region_hidden, this, _1)); } redisplay (); diff --git a/gtk2_ardour/editor_regions.h b/gtk2_ardour/editor_regions.h index 59659d3879..83fd91aaca 100644 --- a/gtk2_ardour/editor_regions.h +++ b/gtk2_ardour/editor_regions.h @@ -149,6 +149,7 @@ private: Editing::RegionListSortType _sort_type; bool _no_redisplay; std::list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list; + PBD::ScopedConnection region_property_connection; }; #endif /* __gtk_ardour_editor_regions_h__ */ diff --git a/gtk2_ardour/editor_route_groups.cc b/gtk2_ardour/editor_route_groups.cc index d0d0298c08..c52817a15a 100644 --- a/gtk2_ardour/editor_route_groups.cc +++ b/gtk2_ardour/editor_route_groups.cc @@ -574,7 +574,7 @@ EditorRouteGroups::add (RouteGroup* group) focus = true; } - group->FlagsChanged.connect (sigc::bind (sigc::mem_fun (*this, &EditorRouteGroups::flags_changed), group)); + group->FlagsChanged.connect (flags_connection, boost::bind (&EditorRouteGroups::flags_changed, this, _1, group)); if (focus) { TreeViewColumn* col = _display.get_column (0); @@ -668,8 +668,8 @@ EditorRouteGroups::set_session (Session* s) EditorComponent::set_session (s); if (_session) { - _session_connections.add_connection (_session->route_group_added.connect (boost::bind (&EditorRouteGroups::add, this, _1))); - _session_connections.add_connection (_session->route_group_removed.connect (boost::bind (&EditorRouteGroups::groups_changed, this))); + _session->route_group_added.connect (_session_connections, boost::bind (&EditorRouteGroups::add, this, _1)); + _session->route_group_removed.connect (_session_connections, boost::bind (&EditorRouteGroups::groups_changed, this)); } groups_changed (); diff --git a/gtk2_ardour/editor_route_groups.h b/gtk2_ardour/editor_route_groups.h index 5408649f95..cb0162d142 100644 --- a/gtk2_ardour/editor_route_groups.h +++ b/gtk2_ardour/editor_route_groups.h @@ -93,6 +93,7 @@ private: Gtk::ScrolledWindow _scroller; Gtk::VBox* _display_packer; bool _in_row_change; + PBD::ScopedConnection flags_connection; }; diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index e3a831a8b9..3ef66161fb 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -150,7 +150,7 @@ EditorRoutes::EditorRoutes (Editor* e) _model->signal_rows_reordered().connect (sigc::mem_fun (*this, &EditorRoutes::reordered)); _display.signal_button_press_event().connect (sigc::mem_fun (*this, &EditorRoutes::button_press), false); - scoped_connect (Route::SyncOrderKeys, (sigc::mem_fun (*this, &EditorRoutes::sync_order_keys))); + Route::SyncOrderKeys.connect (*this, (sigc::mem_fun (*this, &EditorRoutes::sync_order_keys))); } void @@ -161,7 +161,7 @@ EditorRoutes::set_session (Session* s) initial_display (); if (_session) { - scoped_connect (_session->SoloChanged, (sigc::mem_fun (*this, &EditorRoutes::solo_changed_so_update_mute))); + _session->SoloChanged.connect (*this, (sigc::mem_fun (*this, &EditorRoutes::solo_changed_so_update_mute))); } } @@ -383,18 +383,18 @@ EditorRoutes::routes_added (list<RouteTimeAxisView*> routes) boost::weak_ptr<Route> wr ((*x)->route()); - scoped_connect ((*x)->route()->gui_changed, boost::bind (&EditorRoutes::handle_gui_changes, this, _1, _2)); - scoped_connect ((*x)->route()->NameChanged, boost::bind (&EditorRoutes::route_name_changed, this, wr)); - scoped_connect ((*x)->GoingAway, boost::bind (&EditorRoutes::route_removed, this, *x)); + (*x)->route()->gui_changed.connect (*this, boost::bind (&EditorRoutes::handle_gui_changes, this, _1, _2)); + (*x)->route()->NameChanged.connect (*this, boost::bind (&EditorRoutes::route_name_changed, this, wr)); + (*x)->GoingAway.connect (*this, boost::bind (&EditorRoutes::route_removed, this, *x)); if ((*x)->is_track()) { boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track> ((*x)->route()); - scoped_connect (t->diskstream()->RecordEnableChanged, boost::bind (&EditorRoutes::update_rec_display, this)); + t->diskstream()->RecordEnableChanged.connect (*this, boost::bind (&EditorRoutes::update_rec_display, this)); } - scoped_connect ((*x)->route()->mute_changed, boost::bind (&EditorRoutes::update_mute_display, this)); - scoped_connect ((*x)->route()->solo_changed, boost::bind (&EditorRoutes::update_solo_display, this)); - scoped_connect ((*x)->route()->solo_isolated_changed, boost::bind (&EditorRoutes::update_solo_isolate_display, this)); + (*x)->route()->mute_changed.connect (*this, boost::bind (&EditorRoutes::update_mute_display, this)); + (*x)->route()->solo_changed.connect (*this, boost::bind (&EditorRoutes::update_solo_display, this)); + (*x)->route()->solo_isolated_changed.connect (*this, boost::bind (&EditorRoutes::update_solo_isolate_display, this)); } update_rec_display (); diff --git a/gtk2_ardour/editor_routes.h b/gtk2_ardour/editor_routes.h index 23e1e93388..73a10c046c 100644 --- a/gtk2_ardour/editor_routes.h +++ b/gtk2_ardour/editor_routes.h @@ -20,7 +20,7 @@ #ifndef __ardour_gtk_editor_route_h__ #define __ardour_gtk_editor_route_h__ -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "editor_component.h" class EditorRoutes : public EditorComponent, public PBD::ScopedConnectionList diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc index 8a62156a19..93be5afd13 100644 --- a/gtk2_ardour/editor_summary.cc +++ b/gtk2_ardour/editor_summary.cc @@ -47,8 +47,8 @@ EditorSummary::EditorSummary (Editor* e) _zoom_dragging (false) { - Region::RegionPropertyChanged.connect (sigc::hide (sigc::mem_fun (*this, &EditorSummary::set_dirty))); - _editor->playhead_cursor->PositionChanged.connect (sigc::mem_fun (*this, &EditorSummary::playhead_position_changed)); + Region::RegionPropertyChanged.connect (region_property_connection, boost::bind (&CairoWidget::set_dirty, this)); + _editor->playhead_cursor->PositionChanged.connect (position_connection, boost::bind (&EditorSummary::playhead_position_changed, this, _1)); } /** Connect to a session. @@ -62,9 +62,9 @@ EditorSummary::set_session (Session* s) set_dirty (); if (_session) { - _session_connections.add_connection (_session->RegionRemoved.connect (boost::bind (&EditorSummary::set_dirty, this))); - _session_connections.add_connection (_session->StartTimeChanged.connect (boost::bind (&EditorSummary::set_dirty, this))); - _session_connections.add_connection (_session->EndTimeChanged.connect (boost::bind (&EditorSummary::set_dirty, this))); + _session->RegionRemoved.connect (_session_connections, boost::bind (&EditorSummary::set_dirty, this)); + _session->StartTimeChanged.connect (_session_connections, boost::bind (&EditorSummary::set_dirty, this)); + _session->EndTimeChanged.connect (_session_connections, boost::bind (&EditorSummary::set_dirty, this)); } } diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h index e311b47ebd..c59210e657 100644 --- a/gtk2_ardour/editor_summary.h +++ b/gtk2_ardour/editor_summary.h @@ -78,6 +78,9 @@ private: bool _zoom_dragging; bool _zoom_left; + + PBD::ScopedConnectionList position_connection; + PBD::ScopedConnectionList region_property_connection; }; #endif diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 1ec466d449..84202d57ea 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -86,7 +86,7 @@ ExportDialog::set_session (ARDOUR::Session* s) timespan_selector->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::update_warnings)); channel_selector->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::update_warnings)); file_notebook->CriticalSelectionChanged.connect (sigc::mem_fun (*this, &ExportDialog::update_warnings)); - status->Aborting.connect (sigc::mem_fun (*this, &ExportDialog::notify_errors)); + status->Aborting.connect (abort_connection, sigc::mem_fun (*this, &ExportDialog::notify_errors)); update_warnings (); } diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h index 1895e5c3fe..75511b5ad3 100644 --- a/gtk2_ardour/export_dialog.h +++ b/gtk2_ardour/export_dialog.h @@ -107,6 +107,7 @@ class ExportDialog : public ArdourDialog { PublicEditor & editor; StatusPtr status; + PBD::ScopedConnection abort_connection; /*** GUI components ***/ diff --git a/gtk2_ardour/export_file_notebook.cc b/gtk2_ardour/export_file_notebook.cc index 93a78cdad2..5961715d83 100644 --- a/gtk2_ardour/export_file_notebook.cc +++ b/gtk2_ardour/export_file_notebook.cc @@ -196,7 +196,7 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager, tab_close_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*parent, &ExportFileNotebook::remove_file_page), this)); - profile_manager->FormatListChanged.connect (sigc::mem_fun (format_selector, &ExportFormatSelector::update_format_list)); + profile_manager->FormatListChanged.connect (format_connection, boost::bind (&ExportFormatSelector::update_format_list, &format_selector)); format_selector.FormatEdited.connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::save_format_to_manager)); format_selector.FormatRemoved.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::remove_format_profile)); diff --git a/gtk2_ardour/export_file_notebook.h b/gtk2_ardour/export_file_notebook.h index 720c3b4bfd..35768d72a9 100644 --- a/gtk2_ardour/export_file_notebook.h +++ b/gtk2_ardour/export_file_notebook.h @@ -97,6 +97,7 @@ class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr Gtk::Label format_label; Gtk::Alignment format_align; ExportFormatSelector format_selector; + PBD::ScopedConnection format_connection; Gtk::Label filename_label; Gtk::Alignment filename_align; diff --git a/gtk2_ardour/export_format_dialog.cc b/gtk2_ardour/export_format_dialog.cc index 05c1759867..1c93115da3 100644 --- a/gtk2_ardour/export_format_dialog.cc +++ b/gtk2_ardour/export_format_dialog.cc @@ -127,7 +127,7 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog) : close_button = add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_APPLY); close_button->set_sensitive (false); close_button->signal_clicked().connect (sigc::mem_fun (*this, &ExportFormatDialog::end_dialog)); - manager.CompleteChanged.connect (sigc::mem_fun (*close_button, &Gtk::Button::set_sensitive)); + manager.CompleteChanged.connect (*this, sigc::mem_fun (close_button, &Gtk::Button::set_sensitive)); /* Load state before hooking up the rest of the signals */ @@ -319,7 +319,7 @@ ExportFormatDialog::init_format_table () row[compatibility_cols.label] = (*it)->name(); WeakCompatPtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_compatibility_selection), ptr)); + (*it)->SelectChanged.connect (*this, boost::bind (&ExportFormatDialog::change_compatibility_selection, this, _1, ptr)); } compatibility_view.append_column_editable ("", compatibility_cols.selected); @@ -347,8 +347,8 @@ ExportFormatDialog::init_format_table () row[quality_cols.label] = (*it)->name(); WeakQualityPtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_quality_selection), ptr)); - (*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_quality_compatibility), ptr)); + (*it)->SelectChanged.connect (*this, boost::bind (&ExportFormatDialog::change_quality_selection, this, _1, ptr)); + (*it)->CompatibleChanged.connect (*this, boost::bind (&ExportFormatDialog::change_quality_compatibility, this, _1, ptr)); } quality_view.append_column ("", quality_cols.label); @@ -369,19 +369,19 @@ ExportFormatDialog::init_format_table () row[format_cols.label] = (*it)->name(); WeakFormatPtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_format_selection), ptr)); - (*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_format_compatibility), ptr)); + (*it)->SelectChanged.connect (*this, boost::bind (&ExportFormatDialog::change_format_selection, this, _1, ptr)); + (*it)->CompatibleChanged.connect (*this, boost::bind (&ExportFormatDialog::change_format_compatibility, this, _1, ptr)); /* Encoding options */ boost::shared_ptr<HasSampleFormat> hsf; if (hsf = boost::dynamic_pointer_cast<HasSampleFormat> (*it)) { - hsf->SampleFormatSelectChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_format_selection)); - hsf->SampleFormatCompatibleChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_format_compatibility)); + hsf->SampleFormatSelectChanged.connect (*this, boost::bind (&ExportFormatDialog::change_sample_format_selection, this, _1, _2)); + hsf->SampleFormatCompatibleChanged.connect (*this, boost::bind (&ExportFormatDialog::change_sample_format_compatibility, this, _1, _2)); - hsf->DitherTypeSelectChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_dither_type_selection)); - hsf->DitherTypeCompatibleChanged.connect (sigc::mem_fun (*this, &ExportFormatDialog::change_dither_type_compatibility)); + hsf->DitherTypeSelectChanged.connect (*this, boost::bind (&ExportFormatDialog::change_dither_type_selection, this, _1, _2)); + hsf->DitherTypeCompatibleChanged.connect (*this, boost::bind (&ExportFormatDialog::change_dither_type_compatibility, this, _1, _2)); } } @@ -401,10 +401,10 @@ ExportFormatDialog::init_format_table () row[sample_rate_cols.ptr] = *it; row[sample_rate_cols.color] = "white"; row[sample_rate_cols.label] = (*it)->name(); - + WeakSampleRatePtr ptr (*it); - (*it)->SelectChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_rate_selection), ptr)); - (*it)->CompatibleChanged.connect (sigc::bind (sigc::mem_fun (*this, &ExportFormatDialog::change_sample_rate_compatibility), ptr)); + (*it)->SelectChanged.connect (*this, boost::bind (&ExportFormatDialog::change_sample_rate_selection, this, _1, ptr)); + (*it)->CompatibleChanged.connect (*this, boost::bind (&ExportFormatDialog::change_sample_rate_compatibility, this, _1, ptr)); } sample_rate_view.append_column ("", sample_rate_cols.label); diff --git a/gtk2_ardour/export_format_dialog.h b/gtk2_ardour/export_format_dialog.h index 418b015d8c..33a4015022 100644 --- a/gtk2_ardour/export_format_dialog.h +++ b/gtk2_ardour/export_format_dialog.h @@ -27,13 +27,14 @@ #include "ardour/export_formats.h" #include "pbd/xml++.h" +#include "pbd/signals.h" #include "ardour_dialog.h" #include "audio_clock.h" #include <gtkmm.h> -class ExportFormatDialog : public ArdourDialog { +class ExportFormatDialog : public ArdourDialog, public PBD::ScopedConnectionList { private: typedef ARDOUR::ExportFormatManager::WeakCompatPtr WeakCompatPtr; diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 26036f6e66..3c3b70c7cf 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -226,13 +226,13 @@ GainMeterBase::set_controls (boost::shared_ptr<Route> r, boost::shared_ptr<AutomationControl> gc = amp->gain_control(); - model_connections.add_connection (gc->alist()->automation_state_changed.connect (boost::bind (&GainMeter::gain_automation_state_changed, this))); - model_connections.add_connection (gc->alist()->automation_style_changed.connect (boost::bind (&GainMeter::gain_automation_style_changed, this))); + gc->alist()->automation_state_changed.connect (model_connections, boost::bind (&GainMeter::gain_automation_state_changed, this)); + gc->alist()->automation_style_changed.connect (model_connections, boost::bind (&GainMeter::gain_automation_style_changed, this)); gain_automation_state_changed (); } - model_connections.add_connection (amp->gain_control()->Changed.connect (boost::bind (&GainMeterBase::gain_changed, this))); + amp->gain_control()->Changed.connect (model_connections, boost::bind (&GainMeterBase::gain_changed, this)); gain_changed (); show_gain (); diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index 16c818dead..7d089e2ef1 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -32,7 +32,7 @@ #include <gtkmm/drawingarea.h> #include <gdkmm/colormap.h> -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/types.h" #include "ardour/session_handle.h" diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index dc8307eecb..1865c1e0a2 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -125,8 +125,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol main_contents.pack_start (hpacker, false, false); } - pi->ActiveChanged.connect (sigc::bind(sigc::mem_fun(*this, &GenericPluginUI::processor_active_changed), - boost::weak_ptr<Processor>(pi))); + pi->ActiveChanged.connect (active_connection, boost::bind (&GenericPluginUI::processor_active_changed, this, boost::weak_ptr<Processor>(pi))); bypass_button.set_active (!pi->active()); @@ -421,7 +420,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat //control_ui->combo->set_value_in_list(true, false); set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui)); control_ui->combo->signal_changed().connect (sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::control_combo_changed), control_ui)); - mcontrol->Changed.connect (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui)); + mcontrol->Changed.connect (control_connections, boost::bind (&GenericPluginUI::parameter_changed, this, control_ui)); control_ui->pack_start(control_ui->label, true, true); control_ui->pack_start(*control_ui->combo, false, true); @@ -442,7 +441,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat //control_ui->combo->set_value_in_list(true, false); set_popdown_strings (*control_ui->combo, setup_scale_values(port_index, control_ui)); control_ui->combo->signal_changed().connect (sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::control_combo_changed), control_ui)); - mcontrol->Changed.connect (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui)); + mcontrol->Changed.connect (control_connections, boost::bind (&GenericPluginUI::parameter_changed, this, control_ui)); control_ui->pack_start(control_ui->label, true, true); control_ui->pack_start(*control_ui->combo, false, true); @@ -467,7 +466,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat // control_ui->pack_start (control_ui->automate_button, false, false); control_ui->button->signal_clicked().connect (sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::control_port_toggled), control_ui)); - mcontrol->Changed.connect (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::toggle_parameter_changed), control_ui)); + mcontrol->Changed.connect (control_connections, boost::bind (&GenericPluginUI::toggle_parameter_changed, this, control_ui)); if (plugin->get_parameter (port_index) > 0.5){ control_ui->button->set_active(true); @@ -543,9 +542,8 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat automation_state_changed (control_ui); - mcontrol->Changed.connect (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui)); - mcontrol->alist()->automation_state_changed.connect - (sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::automation_state_changed), control_ui)); + mcontrol->Changed.connect (control_connections, boost::bind (&GenericPluginUI::parameter_changed, this, control_ui)); + mcontrol->alist()->automation_state_changed.connect (control_connections, boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui)); } else if (plugin->parameter_is_output (port_index)) { @@ -594,7 +592,7 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat output_controls.push_back (control_ui); } - mcontrol->Changed.connect (sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::parameter_changed), control_ui)); + mcontrol->Changed.connect (control_connections, boost::bind (&GenericPluginUI::parameter_changed, this, control_ui)); return control_ui; } diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc index c7a10636ff..edf1e0e139 100644 --- a/gtk2_ardour/ghostregion.cc +++ b/gtk2_ardour/ghostregion.cc @@ -34,7 +34,7 @@ using namespace Editing; using namespace ArdourCanvas; using namespace ARDOUR; -boost::signals2::signal<void(GhostRegion*)> GhostRegion::GoingAway; +PBD::Signal1<void,GhostRegion*> GhostRegion::GoingAway; GhostRegion::GhostRegion (ArdourCanvas::Group* parent, TimeAxisView& tv, TimeAxisView& source_tv, double initial_pos) : trackview (tv) diff --git a/gtk2_ardour/ghostregion.h b/gtk2_ardour/ghostregion.h index 0932594a6f..b2050996a6 100644 --- a/gtk2_ardour/ghostregion.h +++ b/gtk2_ardour/ghostregion.h @@ -22,7 +22,7 @@ #include <vector> #include <libgnomecanvasmm.h> -#include <boost/signals2.hpp> +#include "pbd/signals.h" #include "canvas.h" namespace Gnome { @@ -57,7 +57,7 @@ public: ArdourCanvas::Group* group; ArdourCanvas::SimpleRect* base_rect; - static boost::signals2::signal<void(GhostRegion*)> GoingAway; + static PBD::Signal1<void,GhostRegion*> GoingAway; }; class AudioGhostRegion : public GhostRegion { diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index 3a7206c9d4..17cec93f82 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -45,7 +45,7 @@ GroupTabs::set_session (Session* s) EditorComponent::set_session (s); if (_session) { - _session_connections.add_connection (_session->RouteGroupChanged.connect (boost::bind (&GroupTabs::set_dirty, this))); + _session->RouteGroupChanged.connect (_session_connections, boost::bind (&GroupTabs::set_dirty, this)); } } diff --git a/gtk2_ardour/imageframe_time_axis.cc b/gtk2_ardour/imageframe_time_axis.cc index 9e1eef2b2e..9dbcb31392 100644 --- a/gtk2_ardour/imageframe_time_axis.cc +++ b/gtk2_ardour/imageframe_time_axis.cc @@ -322,7 +322,7 @@ ImageFrameTimeAxis::add_marker_time_axis(MarkerTimeAxis* marker_track, void* src else { marker_time_axis_list.push_back(marker_track) ; - scoped_connect (marker_track->GoingAway, boost::bind (&ImageFrameTimeAxis::remove_time_axis_view, this, marker_track, (void*)this)); + marker_track->GoingAway.connect (*this, boost::bind (&ImageFrameTimeAxis::remove_time_axis_view, this, marker_track, (void*)this)); MarkerTimeAxisAdded(marker_track, src) ; /* EMIT_SIGNAL */ ret = true ; diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc index 28d2aac1a1..4c33d73dfc 100644 --- a/gtk2_ardour/imageframe_time_axis_group.cc +++ b/gtk2_ardour/imageframe_time_axis_group.cc @@ -216,7 +216,7 @@ ImageFrameTimeAxisGroup::add_imageframe_item(const string & frame_id, nframes_t imageframe_views.push_front(ifv) ; - scoped_connect (ifv->GoingAway, boost::bind (&ImageFrameTimeAxisGroup::remove_imageframe_item, this, (void*)this)); + ifv->GoingAway.connect (*this, boost::bind (&ImageFrameTimeAxisGroup::remove_imageframe_item, this, (void*)this)); ImageFrameAdded(ifv, src) ; /* EMIT_SIGNAL */ } diff --git a/gtk2_ardour/imageframe_time_axis_view.cc b/gtk2_ardour/imageframe_time_axis_view.cc index fa339b42ec..05dda6bc8e 100644 --- a/gtk2_ardour/imageframe_time_axis_view.cc +++ b/gtk2_ardour/imageframe_time_axis_view.cc @@ -214,9 +214,9 @@ ImageFrameTimeAxisView::add_imageframe_group(std::string group_id, void* src) imageframe_groups.push_front(iftag) ; - scoped_connect (iftag->GoingAway, boost::bind (&ImageFrameTimeAxisView::remove_imageframe_group, this, iftag, (void*)this)) ; + iftag->GoingAway.connect (*this, boost::bind (&ImageFrameTimeAxisView::remove_imageframe_group, this, iftag, (void*)this)); - ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */ + ImageFrameGroupAdded(iftag, src) ; /* EMIT_SIGNAL */ } return(iftag) ; diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc index c704eb9768..273ac30b99 100644 --- a/gtk2_ardour/imageframe_view.cc +++ b/gtk2_ardour/imageframe_view.cc @@ -287,7 +287,7 @@ ImageFrameView::add_marker_view_item(MarkerView* item, void* src) { marker_view_list.push_back(item) ; - scoped_connect (item->GoingAway, boost::bind (&ImageFrameView::remove_marker_view_item, this, (void*)this)); + item->GoingAway.connect (*this, boost::bind (&ImageFrameView::remove_marker_view_item, this, (void*)this)); MarkerViewAdded(item, src) ; /* EMIT_SIGNAL */ } diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index 77f917d92b..e038035a95 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -272,7 +272,7 @@ PortInsertWindow::PortInsertWindow (ARDOUR::Session* sess, boost::shared_ptr<ARD signal_delete_event().connect (sigc::mem_fun (*this, &PortInsertWindow::wm_delete), false); - going_away_connection = pi->GoingAway.connect (sigc::mem_fun (*this, &PortInsertWindow::plugin_going_away)); + pi->GoingAway.connect (going_away_connection, boost::bind (&PortInsertWindow::plugin_going_away, this)); } bool diff --git a/gtk2_ardour/level_meter.cc b/gtk2_ardour/level_meter.cc index bd85596a8c..c0908d8295 100644 --- a/gtk2_ardour/level_meter.cc +++ b/gtk2_ardour/level_meter.cc @@ -59,7 +59,7 @@ LevelMeter::LevelMeter (Session* s) { set_session (s); set_spacing (1); - Config->ParameterChanged.connect (sigc::mem_fun (*this, &LevelMeter::parameter_changed)); + Config->ParameterChanged.connect (_parameter_connection, boost::bind (&LevelMeter::parameter_changed, this, _1)); UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &LevelMeter::on_theme_changed)); ColorsChanged.connect (sigc::mem_fun (*this, &LevelMeter::color_handler)); max_peak = minus_infinity(); @@ -85,7 +85,7 @@ LevelMeter::set_meter (PeakMeter* meter) _meter = meter; if (_meter) { - _configuration_connection = _meter->ConfigurationChanged.connect(boost::bind (&LevelMeter::configuration_changed, this, _1, _2)); + _meter->ConfigurationChanged.connect (_configuration_connection, boost::bind (&LevelMeter::configuration_changed, this, _1, _2)); } } diff --git a/gtk2_ardour/level_meter.h b/gtk2_ardour/level_meter.h index cd2ccb7d7d..4b2a0cdbc9 100644 --- a/gtk2_ardour/level_meter.h +++ b/gtk2_ardour/level_meter.h @@ -68,7 +68,7 @@ class LevelMeter : public Gtk::HBox, public ARDOUR::SessionHandlePtr private: ARDOUR::PeakMeter* _meter; - + Width _width; struct MeterInfo { @@ -91,7 +91,8 @@ class LevelMeter : public Gtk::HBox, public ARDOUR::SessionHandlePtr std::vector<MeterInfo> meters; float max_peak; - boost::signals2::scoped_connection _configuration_connection; + PBD::ScopedConnection _configuration_connection; + PBD::ScopedConnection _parameter_connection; void hide_all_meters (); gint meter_button_release (GdkEventButton*, uint32_t); diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 328d87b544..61a0ec1405 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -282,11 +282,11 @@ LocationEditRow::set_location (Location *loc) end_clock.set_sensitive (!location->locked()); length_clock.set_sensitive (!location->locked()); - connections.add_connection (location->start_changed.connect (boost::bind (&LocationEditRow::start_changed, this, _1))); - connections.add_connection (location->end_changed.connect (boost::bind (&LocationEditRow::end_changed, this, _1))); - connections.add_connection (location->name_changed.connect (boost::bind (&LocationEditRow::name_changed, this, _1))); - connections.add_connection (location->changed.connect (boost::bind (&LocationEditRow::location_changed, this, _1))); - connections.add_connection (location->FlagsChanged.connect (boost::bind (&LocationEditRow::flags_changed, this, _1, _2))); + location->start_changed.connect (connections, boost::bind (&LocationEditRow::start_changed, this, _1)); + location->end_changed.connect (connections, boost::bind (&LocationEditRow::end_changed, this, _1)); + location->name_changed.connect (connections, boost::bind (&LocationEditRow::name_changed, this, _1)); + location->changed.connect (connections, boost::bind (&LocationEditRow::location_changed, this, _1)); + location->FlagsChanged.connect (connections, boost::bind (&LocationEditRow::flags_changed, this, _1, _2)); } void @@ -860,10 +860,10 @@ LocationUI::set_session(ARDOUR::Session* s) SessionHandlePtr::set_session (s); if (_session) { - _session_connections.add_connection (_session->locations()->changed.connect (boost::bind (&LocationUI::refresh_location_list, this))); - _session_connections.add_connection (_session->locations()->StateChanged.connect (boost::bind (&LocationUI::refresh_location_list, this))); - _session_connections.add_connection (_session->locations()->added.connect (boost::bind (&LocationUI::location_added, this, _1))); - _session_connections.add_connection (_session->locations()->removed.connect (boost::bind (&LocationUI::location_removed, this, _1))); + _session->locations()->changed.connect (_session_connections, boost::bind (&LocationUI::refresh_location_list, this)); + _session->locations()->StateChanged.connect (_session_connections, boost::bind (&LocationUI::refresh_location_list, this)); + _session->locations()->added.connect (_session_connections, boost::bind (&LocationUI::location_added, this, _1)); + _session->locations()->removed.connect (_session_connections, boost::bind (&LocationUI::location_removed, this, _1)); } refresh_location_list (); diff --git a/gtk2_ardour/location_ui.h b/gtk2_ardour/location_ui.h index dd735cddba..ea6b80f3a4 100644 --- a/gtk2_ardour/location_ui.h +++ b/gtk2_ardour/location_ui.h @@ -29,7 +29,7 @@ #include <gtkmm/paned.h> #include <gtkmm/scrolledwindow.h> -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/location.h" #include "ardour/session_handle.h" diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 335c643373..2f108efc8a 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -227,7 +227,7 @@ LV2PluginUI::lv2ui_instantiate(const Glib::ustring& title) } } - _lv2->ParameterChanged.connect(sigc::mem_fun(*this, &LV2PluginUI::parameter_changed)); + _lv2->ParameterChanged.connect (parameter_connection, boost::bind (&LV2PluginUI::parameter_changed, this, _1, _2)); } LV2PluginUI::~LV2PluginUI () diff --git a/gtk2_ardour/lv2_plugin_ui.h b/gtk2_ardour/lv2_plugin_ui.h index cad242a6f0..bc9b14c8f3 100644 --- a/gtk2_ardour/lv2_plugin_ui.h +++ b/gtk2_ardour/lv2_plugin_ui.h @@ -92,6 +92,8 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox virtual bool on_window_show(const Glib::ustring& title); virtual void on_window_hide(); + + PBD::ScopedConnection parameter_connection; }; #endif // HAVE_SLV2 diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc index 402f2ac479..2d9a30b0a3 100644 --- a/gtk2_ardour/marker_time_axis_view.cc +++ b/gtk2_ardour/marker_time_axis_view.cc @@ -211,7 +211,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type, ifv->add_marker_view_item(mv, src) ; marker_view_list.push_front(mv) ; - scoped_connect (mv->GoingAway, boost::bind (&MarkerTimeAxisView::remove_marker_view, this, (void*)this)); + mv->GoingAway.connect (*this, boost::bind (&MarkerTimeAxisView::remove_marker_view, this, (void*)this)); MarkerViewAdded(mv,src) ; /* EMIT_SIGNAL */ diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index d2f1657821..4f0c25a72c 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -585,7 +585,7 @@ MidiRegionView::display_model(boost::shared_ptr<MidiModel> model) { _model = model; content_connection.disconnect (); - content_connection = _model->ContentsChanged.connect (boost::bind (&MidiRegionView::redisplay_model, this)); + _model->ContentsChanged.connect (content_connection, boost::bind (&MidiRegionView::redisplay_model, this)); clear_events (); @@ -1071,7 +1071,7 @@ MidiRegionView::add_ghost (TimeAxisView& tv) } } - ghost->GoingAway.connect (boost::bind (&RegionView::remove_ghost, this, _1)); + ghost->GoingAway.connect (*this, boost::bind (&RegionView::remove_ghost, this, _1)); return ghost; } diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 4d0c7fa385..76d34a4a50 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -180,7 +180,7 @@ MidiStreamView::add_region_view_internal (boost::shared_ptr<Region> r, bool wfd, display_region (region_view, wfd); /* catch regionview going away */ - scoped_connect (region->GoingAway, boost::bind (&MidiStreamView::remove_region_view, this, region)); + region->GoingAway.connect (*this, boost::bind (&MidiStreamView::remove_region_view, this, region)); RegionViewAdded (region_view); @@ -401,9 +401,9 @@ MidiStreamView::setup_rec_box () sources.push_back(mds->write_source()); - rec_data_ready_connections.add_connection (mds->write_source()->ViewDataRangeReady.connect - (boost::bind (&MidiStreamView::rec_data_range_ready, this, - _1, _2, boost::weak_ptr<Source>(mds->write_source())))); + mds->write_source()->ViewDataRangeReady.connect + (rec_data_ready_connections, boost::bind (&MidiStreamView::rec_data_range_ready, this, + _1, _2, boost::weak_ptr<Source>(mds->write_source()))); // handle multi diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 9344e19943..3b1ad17a22 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -137,7 +137,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, set_state (*xml_node, Stateful::loading_state_version); - _route->processors_changed.connect (sigc::mem_fun(*this, &MidiTimeAxisView::processors_changed)); + _route->processors_changed.connect (*this, boost::bind (&MidiTimeAxisView::processors_changed, this, _1)); if (is_track()) { _piano_roll_header = new PianoRollHeader(*midi_view()); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index bfbdb6ac6e..275cd14b02 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -257,8 +257,8 @@ MixerStrip::init () _packed = false; _embedded = false; - _session->engine().Stopped.connect (sigc::mem_fun(*this, &MixerStrip::engine_stopped)); - _session->engine().Running.connect (sigc::mem_fun(*this, &MixerStrip::engine_running)); + _session->engine().Stopped.connect (*this, boost::bind (&MixerStrip::engine_stopped, this)); + _session->engine().Running.connect (*this, boost::bind (&MixerStrip::engine_running, this)); input_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MixerStrip::input_press), false); output_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MixerStrip::output_press), false); @@ -363,7 +363,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) boost::shared_ptr<AudioTrack> at = audio_track(); - connections.add_connection (at->FreezeChange.connect (sigc::mem_fun(*this, &MixerStrip::map_frozen))); + at->FreezeChange.connect (route_connections, boost::bind (&MixerStrip::map_frozen, this)); button_table.attach (*rec_enable_button, 0, 2, 2, 3); rec_enable_button->set_sensitive (_session->writable()); @@ -412,22 +412,22 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt) _("Click to Add/Edit Comments"): _route->comment()); - connections.add_connection (_route->meter_change.connect (sigc::mem_fun(*this, &MixerStrip::meter_changed))); - connections.add_connection (_route->input()->changed.connect (sigc::mem_fun(*this, &MixerStrip::input_changed))); - connections.add_connection (_route->output()->changed.connect (sigc::mem_fun(*this, &MixerStrip::output_changed))); - connections.add_connection (_route->route_group_changed.connect (sigc::mem_fun(*this, &MixerStrip::route_group_changed))); + _route->meter_change.connect (route_connections, boost::bind (&MixerStrip::meter_changed, this, _1)); + _route->input()->changed.connect (route_connections, boost::bind (&MixerStrip::input_changed, this, _1, _2)); + _route->output()->changed.connect (route_connections, boost::bind (&MixerStrip::output_changed, this, _1, _2)); + _route->route_group_changed.connect (route_connections, boost::bind (&MixerStrip::route_group_changed, this)); if (_route->panner()) { - connections.add_connection (_route->panner()->Changed.connect (sigc::mem_fun(*this, &MixerStrip::connect_to_pan))); + _route->panner()->Changed.connect (route_connections, boost::bind (&MixerStrip::connect_to_pan, this)); } if (is_audio_track()) { - connections.add_connection (audio_track()->DiskstreamChanged.connect (sigc::mem_fun(*this, &MixerStrip::diskstream_changed))); + audio_track()->DiskstreamChanged.connect (route_connections, boost::bind (&MixerStrip::diskstream_changed, this)); } - connections.add_connection (_route->NameChanged.connect (sigc::mem_fun(*this, &RouteUI::name_changed))); - connections.add_connection (_route->comment_changed.connect (sigc::mem_fun(*this, &MixerStrip::comment_changed))); - connections.add_connection (_route->gui_changed.connect (sigc::mem_fun(*this, &MixerStrip::route_gui_changed))); + _route->NameChanged.connect (route_connections, boost::bind (&RouteUI::name_changed, this)); + _route->comment_changed.connect (route_connections, boost::bind (&MixerStrip::comment_changed, this, _1)); + _route->gui_changed.connect (route_connections, boost::bind (&MixerStrip::route_gui_changed, this, _1, _2)); set_stuff_from_route (); @@ -928,8 +928,8 @@ MixerStrip::connect_to_pan () _route->panner()->data().control(Evoral::Parameter(PanAutomation))); if (pan_control) { - panstate_connection = pan_control->alist()->automation_state_changed.connect (sigc::mem_fun(panners, &PannerUI::pan_automation_state_changed)); - panstyle_connection = pan_control->alist()->automation_style_changed.connect (sigc::mem_fun(panners, &PannerUI::pan_automation_style_changed)); + pan_control->alist()->automation_state_changed.connect (panstate_connection, boost::bind (&PannerUI::pan_automation_state_changed, &panners)); + pan_control->alist()->automation_style_changed.connect (panstyle_connection, boost::bind (&PannerUI::pan_automation_style_changed, &panners)); } panners.pan_changed (this); @@ -1693,7 +1693,7 @@ MixerStrip::show_send (boost::shared_ptr<Send> send) _current_delivery = send; send->set_metering (true); - send_gone_connection = _current_delivery->GoingAway.connect (sigc::mem_fun (*this, &MixerStrip::revert_to_default_display)); + _current_delivery->GoingAway.connect (send_gone_connection, boost::bind (&MixerStrip::revert_to_default_display, this)); gain_meter().set_controls (_route, send->meter(), send->amp()); gain_meter().setup_meters (); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 9ec05c020c..0484db6fe7 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -74,7 +74,7 @@ Mixer_UI::Mixer_UI () strip_redisplay_does_not_sync_order_keys = false; ignore_sync = false; - Route::SyncOrderKeys.connect (sigc::mem_fun (*this, &Mixer_UI::sync_order_keys)); + Route::SyncOrderKeys.connect (*this, boost::bind (&Mixer_UI::sync_order_keys, this, _1)); scroller_base.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); scroller_base.set_name ("MixerWindow"); @@ -333,9 +333,9 @@ Mixer_UI::add_strip (RouteList& routes) route->set_order_key (N_("signal"), track_model->children().size()-1); } - route->NameChanged.connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_name_changed), strip)); + route->NameChanged.connect (*this, boost::bind (&Mixer_UI::strip_name_changed, this, strip)); - scoped_connect (strip->GoingAway, boost::bind (&Mixer_UI::remove_strip, this, strip)); + strip->GoingAway.connect (*this, boost::bind (&Mixer_UI::remove_strip, this, strip)); strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed)); strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); } @@ -476,10 +476,10 @@ Mixer_UI::set_session (Session* sess) initial_track_display (); - _session_connections.add_connection (_session->RouteAdded.connect (boost::bind (&Mixer_UI::add_strip, this, _1))); - _session_connections.add_connection (_session->route_group_added.connect (boost::bind (&Mixer_UI::add_route_group, this, _1))); - _session_connections.add_connection (_session->route_group_removed.connect (boost::bind (&Mixer_UI::route_groups_changed, this))); - _session_connections.add_connection (_session->config.ParameterChanged.connect (boost::bind (&Mixer_UI::parameter_changed, this, _1))); + _session->RouteAdded.connect (_session_connections, boost::bind (&Mixer_UI::add_strip, this, _1)); + _session->route_group_added.connect (_session_connections, boost::bind (&Mixer_UI::add_route_group, this, _1)); + _session->route_group_removed.connect (_session_connections, boost::bind (&Mixer_UI::route_groups_changed, this)); + _session->config.ParameterChanged.connect (_session_connections, boost::bind (&Mixer_UI::parameter_changed, this, _1)); route_groups_changed (); @@ -1252,7 +1252,7 @@ Mixer_UI::add_route_group (RouteGroup* group) focus = true; } - group->FlagsChanged.connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::group_flags_changed), group)); + group->FlagsChanged.connect (*this, boost::bind (&Mixer_UI::group_flags_changed, this, _1, group)); if (focus) { TreeViewColumn* col = group_display.get_column (0); diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index 275c0151cd..eeda3c4062 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -33,7 +33,7 @@ #include <gtkmm/treeview.h> #include "pbd/stateful.h" -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/ardour.h" #include "ardour/session_handle.h" diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index b67180cb09..f11731b6de 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -164,7 +164,7 @@ OptionEditor::OptionEditor (Configuration* c, std::string const & t) show_all_children(); /* Watch out for changes to parameters */ - _config->ParameterChanged.connect (sigc::mem_fun (*this, &OptionEditor::parameter_changed)); + _config->ParameterChanged.connect (config_connection, boost::bind (&OptionEditor::parameter_changed, this, _1)); } OptionEditor::~OptionEditor () diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index ec68a5d8d9..0f14b05b25 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -364,6 +364,7 @@ protected: private: void parameter_changed (std::string const &); + PBD::ScopedConnection config_connection; Gtk::Notebook _notebook; std::map<std::string, OptionEditorPage*> _pages; diff --git a/gtk2_ardour/panner2d.cc b/gtk2_ardour/panner2d.cc index 08a4aa7b1b..8b7f5802b5 100644 --- a/gtk2_ardour/panner2d.cc +++ b/gtk2_ardour/panner2d.cc @@ -72,8 +72,8 @@ Panner2d::Panner2d (boost::shared_ptr<Panner> p, int32_t h) allow_y = false; allow_target = false; - panner->StateChanged.connect (sigc::mem_fun(*this, &Panner2d::handle_state_change)); - panner->Changed.connect (sigc::mem_fun(*this, &Panner2d::handle_position_change)); + panner->StateChanged.connect (state_connection, boost::bind (&Panner2d::handle_state_change, this)); + panner->Changed.connect (change_connection, boost::bind (&Panner2d::handle_position_change, this)); drag_target = 0; set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK); diff --git a/gtk2_ardour/panner2d.h b/gtk2_ardour/panner2d.h index 91f4851746..0299558f8f 100644 --- a/gtk2_ardour/panner2d.h +++ b/gtk2_ardour/panner2d.h @@ -128,6 +128,9 @@ class Panner2d : public Gtk::DrawingArea void toggle_bypass (); void handle_state_change (); void handle_position_change (); + + PBD::ScopedConnection state_connection; + PBD::ScopedConnection change_connection; }; class Panner2dWindow : public Gtk::Window diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 7e80c9e641..4321a7ebad 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -151,9 +151,9 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p) return; } - connections.add_connection (_panner->Changed.connect (sigc::mem_fun(*this, &PannerUI::panner_changed))); - connections.add_connection (_panner->LinkStateChanged.connect (sigc::mem_fun(*this, &PannerUI::update_pan_linkage))); - connections.add_connection (_panner->StateChanged.connect (sigc::mem_fun(*this, &PannerUI::update_pan_state))); + _panner->Changed.connect (connections, boost::bind (&PannerUI::panner_changed, this)); + _panner->LinkStateChanged.connect (connections, boost::bind (&PannerUI::update_pan_linkage, this)); + _panner->StateChanged.connect (connections, boost::bind (&PannerUI::update_pan_state, this)); setup_pan (); @@ -404,8 +404,7 @@ PannerUI::setup_pan () pan_adjustments.back()->set_value(rx); pan_adjustments.back()->signal_value_changed().connect (sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz)); - _panner->pan_control( asz )->Changed.connect (sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_value_changed), (uint32_t) asz)); - + _panner->pan_control( asz )->Changed.connect (connections, boost::bind (&PannerUI::pan_value_changed, this, (uint32_t) asz)); bc->set_name ("PanSlider"); bc->set_shadow_type (Gtk::SHADOW_NONE); diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 46eb34dd0a..3ee64fc9b5 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -115,7 +115,7 @@ PluginEqGui::PluginEqGui(boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert) // Connect the realtime signal collection callback - _plugin_insert->AnalysisDataGathered.connect( sigc::mem_fun(*this, &PluginEqGui::signal_collect_callback )); + _plugin_insert->AnalysisDataGathered.connect (analysis_connection, boost::bind (&PluginEqGui::signal_collect_callback, this, _1, _2)); } PluginEqGui::~PluginEqGui() diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h index 462cae7aa8..163da38478 100644 --- a/gtk2_ardour/plugin_eq_gui.h +++ b/gtk2_ardour/plugin_eq_gui.h @@ -137,6 +137,8 @@ class PluginEqGui : public Gtk::Table sigc::connection _update_connection; sigc::connection _window_unmap_connection; sigc::connection _window_map_connection; + + PBD::ScopedConnection analysis_connection; }; #endif diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 35befc0d69..48bb5f5c7e 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -74,7 +74,7 @@ PluginSelector::PluginSelector (PluginManager *mgr) manager = mgr; in_row_change = false; - manager->PluginListChanged.connect (sigc::mem_fun (*this, &PluginSelector::build_plugin_menu)); + manager->PluginListChanged.connect (plugin_list_changed_connection, boost::bind (&PluginSelector::build_plugin_menu, this)); build_plugin_menu (); plugin_model = Gtk::ListStore::create (plugin_columns); diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index 7e0c66b60f..a9f9803809 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -138,6 +138,7 @@ class PluginSelector : public ArdourDialog Gtk::Menu* create_by_creator_menu (ARDOUR::PluginInfoList&); Gtk::Menu* create_by_category_menu (ARDOUR::PluginInfoList&); void build_plugin_menu (); + PBD::ScopedConnection plugin_list_changed_connection; }; #endif // __ardour_plugin_selector_h__ diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index dd2b0b204d..24106c4351 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -142,7 +142,7 @@ PluginUIWindow::PluginUIWindow (Gtk::Window* win, boost::shared_ptr<PluginInsert add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window*> (this)), false); - death_connection = insert->GoingAway.connect (sigc::mem_fun(*this, &PluginUIWindow::plugin_going_away)); + insert->GoingAway.connect (death_connection, boost::bind (&PluginUIWindow::plugin_going_away, this)); gint h = _pluginui->get_preferred_height (); gint w = _pluginui->get_preferred_width (); @@ -390,9 +390,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi) save_button.set_name ("PluginSaveButton"); save_button.signal_clicked().connect(sigc::mem_fun(*this, &PlugUIBase::save_plugin_setting)); - insert->ActiveChanged.connect (sigc::bind( - sigc::mem_fun(*this, &PlugUIBase::processor_active_changed), - boost::weak_ptr<Processor>(insert))); + insert->ActiveChanged.connect (active_connection, boost::bind (&PlugUIBase::processor_active_changed, this, boost::weak_ptr<Processor>(insert))); bypass_button.set_active (!pi->active()); @@ -416,7 +414,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi) plugin_analysis_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &PlugUIBase::toggle_plugin_analysis)); plugin_analysis_expander.set_expanded(false); - death_connection = insert->GoingAway.connect (sigc::mem_fun (*this, &PlugUIBase::plugin_going_away)); + insert->GoingAway.connect (death_connection, boost::bind (&PlugUIBase::plugin_going_away, this)); } PlugUIBase::~PlugUIBase() diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h index cf1bcd0ed8..b2e0504538 100644 --- a/gtk2_ardour/plugin_ui.h +++ b/gtk2_ardour/plugin_ui.h @@ -121,7 +121,10 @@ class PlugUIBase : public virtual sigc::trackable void toggle_plugin_analysis (); void processor_active_changed (boost::weak_ptr<ARDOUR::Processor> p); void plugin_going_away (); - boost::signals2::scoped_connection death_connection; + + PBD::ScopedConnection death_connection; + PBD::ScopedConnection active_connection; + PBD::ScopedConnectionList control_connections; }; class GenericPluginUI : public PlugUIBase, public Gtk::VBox diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index 11e75c1fc3..4c983d1a62 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -116,7 +116,7 @@ PortGroup::add_bundle_internal (boost::shared_ptr<Bundle> b, boost::shared_ptr<I } BundleRecord* br = new BundleRecord (b, io, colour, has_colour); - br->changed_connection = b->Changed.connect (boost::bind (&PortGroup::bundle_changed, this, _1)); + b->Changed.connect (br->changed_connection, boost::bind (&PortGroup::bundle_changed, this, _1)); _bundles.push_back (br); Changed (); @@ -521,9 +521,8 @@ PortGroupList::add_group (boost::shared_ptr<PortGroup> g) { _groups.push_back (g); - g->Changed.connect (sigc::mem_fun (*this, &PortGroupList::emit_changed)); - - _bundle_changed_connections.add_connection (g->BundleChanged.connect (sigc::mem_fun (*this, &PortGroupList::emit_bundle_changed))); + g->Changed.connect (_changed_connections, boost::bind (&PortGroupList::emit_changed, this)); + g->BundleChanged.connect (_bundle_changed_connections, boost::bind (&PortGroupList::emit_bundle_changed, this, _1)); emit_changed (); } diff --git a/gtk2_ardour/port_group.h b/gtk2_ardour/port_group.h index ebab997699..bc0615a7a9 100644 --- a/gtk2_ardour/port_group.h +++ b/gtk2_ardour/port_group.h @@ -24,7 +24,7 @@ #include <string> #include <set> #include <boost/shared_ptr.hpp> -#include <boost/signals2.hpp> +#include "pbd/signals.h" #include <gtkmm/widget.h> #include <gtkmm/checkbutton.h> @@ -66,10 +66,10 @@ public: bool has_port (std::string const &) const; /** The bundle list has changed in some way; a bundle has been added or removed, or the list cleared etc. */ - sigc::signal<void> Changed; + PBD::Signal0<void> Changed; /** An individual bundle on our list has changed in some way */ - boost::signals2::signal<void(ARDOUR::Bundle::Change)> BundleChanged; + PBD::Signal1<void,ARDOUR::Bundle::Change> BundleChanged; struct BundleRecord { boost::shared_ptr<ARDOUR::Bundle> bundle; @@ -132,10 +132,10 @@ class PortGroupList : public sigc::trackable bool empty () const; /** The group list has changed in some way; a group has been added or removed, or the list cleared etc. */ - boost::signals2::signal<void()> Changed; + PBD::Signal0<void> Changed; /** A bundle in one of our groups has changed */ - boost::signals2::signal<void(ARDOUR::Bundle::Change)> BundleChanged; + PBD::Signal1<void,ARDOUR::Bundle::Change> BundleChanged; private: bool port_has_prefix (std::string const &, std::string const &) const; @@ -152,6 +152,7 @@ class PortGroupList : public sigc::trackable mutable PortGroup::BundleList _bundles; List _groups; PBD::ScopedConnectionList _bundle_changed_connections; + PBD::ScopedConnectionList _changed_connections; bool _signals_suspended; bool _pending_change; ARDOUR::Bundle::Change _pending_bundle_change; diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index 9d5187ca2e..7e2a1d892a 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -135,10 +135,10 @@ PortMatrix::init () for (int i = 0; i < 2; ++i) { /* watch for the content of _ports[] changing */ - _ports[i].Changed.connect (sigc::mem_fun (*this, &PortMatrix::setup)); + _ports[i].Changed.connect (_changed_connections, boost::bind (&PortMatrix::setup, this)); /* and for bundles in _ports[] changing */ - _ports[i].BundleChanged.connect (sigc::hide (sigc::mem_fun (*this, &PortMatrix::setup))); + _ports[i].BundleChanged.connect (_bundle_changed_connections, boost::bind (&PortMatrix::setup, this)); } /* scrolling stuff */ @@ -149,13 +149,13 @@ PortMatrix::init () /* Part 2: notice when things have changed that require our subclass to clear and refill _ports[] */ /* watch for routes being added or removed */ - _session_connections.add_connection (_session->RouteAdded.connect (boost::bind (&PortMatrix::routes_changed, this))); + _session->RouteAdded.connect (_session_connections, boost::bind (&PortMatrix::routes_changed, this)); /* and also bundles */ - _session_connections.add_connection (_session->BundleAdded.connect (boost::bind (&PortMatrix::setup_global_ports, this))); + _session->BundleAdded.connect (_session_connections, boost::bind (&PortMatrix::setup_global_ports, this)); /* and also ports */ - _session_connections.add_connection (_session->engine().PortRegisteredOrUnregistered.connect (boost::bind (&PortMatrix::setup_global_ports, this))); + _session->engine().PortRegisteredOrUnregistered.connect (_session_connections, boost::bind (&PortMatrix::setup_global_ports, this)); reconnect_to_routes (); @@ -170,7 +170,7 @@ PortMatrix::reconnect_to_routes () boost::shared_ptr<RouteList> routes = _session->get_routes (); for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { - _route_connections.add_connection ((*i)->processors_changed.connect (sigc::mem_fun (*this, &PortMatrix::route_processors_changed))); + (*i)->processors_changed.connect (_route_connections, boost::bind (&PortMatrix::route_processors_changed, this, _1)); } } diff --git a/gtk2_ardour/port_matrix.h b/gtk2_ardour/port_matrix.h index 950d5bfd32..373a316257 100644 --- a/gtk2_ardour/port_matrix.h +++ b/gtk2_ardour/port_matrix.h @@ -193,6 +193,8 @@ private: /// port type that we are working with ARDOUR::DataType _type; PBD::ScopedConnectionList _route_connections; + PBD::ScopedConnectionList _changed_connections; + PBD::ScopedConnectionList _bundle_changed_connections; PortMatrixBody* _body; Gtk::HScrollbar _hscroll; diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc index f448952c4a..0732873f5c 100644 --- a/gtk2_ardour/port_matrix_body.cc +++ b/gtk2_ardour/port_matrix_body.cc @@ -254,7 +254,7 @@ PortMatrixBody::setup () PortGroup::BundleList r = _matrix->visible_rows()->bundles (); for (PortGroup::BundleList::iterator i = r.begin(); i != r.end(); ++i) { - _bundle_connections.add_connection ((*i)->bundle->Changed.connect (boost::bind (&PortMatrixBody::rebuild_and_draw_row_labels, this))); + (*i)->bundle->Changed.connect (_bundle_connections, boost::bind (&PortMatrixBody::rebuild_and_draw_row_labels, this)); } } @@ -262,7 +262,7 @@ PortMatrixBody::setup () if (_matrix->visible_columns()) { PortGroup::BundleList c = _matrix->visible_columns()->bundles (); for (PortGroup::BundleList::iterator i = c.begin(); i != c.end(); ++i) { - _bundle_connections.add_connection ((*i)->bundle->Changed.connect (boost::bind (&PortMatrixBody::rebuild_and_draw_column_labels, this))); + (*i)->bundle->Changed.connect (_bundle_connections, boost::bind (&PortMatrixBody::rebuild_and_draw_column_labels, this)); } } diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 3e07305868..615294b6ac 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -106,8 +106,8 @@ ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> p, Width w) _active.set_active (_processor->active ()); _active.signal_toggled().connect (sigc::mem_fun (*this, &ProcessorEntry::active_toggled)); - _processor->ActiveChanged.connect (sigc::mem_fun (*this, &ProcessorEntry::processor_active_changed)); - _processor->NameChanged.connect (sigc::mem_fun (*this, &ProcessorEntry::processor_name_changed)); + _processor->ActiveChanged.connect (active_connection, boost::bind (&ProcessorEntry::processor_active_changed, this)); + _processor->NameChanged.connect (name_connection, boost::bind (&ProcessorEntry::processor_name_changed, this)); } EventBox& @@ -229,7 +229,7 @@ SendProcessorEntry::SendProcessorEntry (boost::shared_ptr<Send> s, Width w) _vbox.pack_start (_fader); _adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &SendProcessorEntry::gain_adjusted)); - _send->amp()->gain_control()->Changed.connect (sigc::mem_fun (*this, &SendProcessorEntry::show_gain)); + _send->amp()->gain_control()->Changed.connect (send_gain_connection, boost::bind (&SendProcessorEntry::show_gain, this)); show_gain (); } @@ -326,9 +326,9 @@ ProcessorBox::set_route (boost::shared_ptr<Route> r) no_processor_redisplay = false; _route = r; - connections.add_connection (_route->processors_changed.connect (sigc::mem_fun (*this, &ProcessorBox::route_processors_changed))); - connections.add_connection (_route->GoingAway.connect (sigc::mem_fun (*this, &ProcessorBox::route_going_away))); - connections.add_connection (_route->NameChanged.connect (sigc::mem_fun(*this, &ProcessorBox::route_name_changed))); + _route->processors_changed.connect (connections, boost::bind (&ProcessorBox::route_processors_changed, this, _1)); + _route->GoingAway.connect (connections, boost::bind (&ProcessorBox::route_going_away, this)); + _route->NameChanged.connect (connections, boost::bind (&ProcessorBox::route_name_changed, this)); redisplay_processors (); } diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index e704eba015..a80dce00fe 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -36,7 +36,7 @@ #include <gtkmm2ext/pixfader.h> #include "pbd/stateful.h" -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/types.h" #include "ardour/ardour.h" @@ -100,6 +100,8 @@ private: Gtk::CheckButton _active; boost::shared_ptr<ARDOUR::Processor> _processor; Width _width; + PBD::ScopedConnection active_connection; + PBD::ScopedConnection name_connection; }; class SendProcessorEntry : public ProcessorEntry @@ -120,7 +122,8 @@ private: Gtk::Adjustment _adjustment; Gtkmm2ext::HSliderController _fader; bool _ignore_gain_change; - + PBD::ScopedConnection send_gain_connection; + static Glib::RefPtr<Gdk::Pixbuf> _slider; }; diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index a3796a6746..c4c75ea6d7 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -107,6 +107,7 @@ private: MIDI::Manager::PortList const & ports = MIDI::Manager::instance()->get_midi_ports (); _store->clear (); + port_connections.drop_connections (); for (MIDI::Manager::PortList::const_iterator i = ports.begin(); i != ports.end(); ++i) { @@ -116,7 +117,7 @@ private: if ((*i)->input()) { r[_model.online] = !(*i)->input()->offline(); - (*i)->input()->OfflineStatusChanged.connect (sigc::bind (sigc::mem_fun (*this, &MIDIPorts::port_offline_changed), (*i))); + (*i)->input()->OfflineStatusChanged.connect (port_connections, boost::bind (&MIDIPorts::port_offline_changed, this, (*i))); r[_model.trace_input] = (*i)->input()->tracing(); } @@ -216,6 +217,7 @@ private: ComboBoxText _mmc_combo; ComboBoxText _mpc_combo; list<ComboOption<string>* > _port_combos; + PBD::ScopedConnectionList port_connections; }; diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index 30f6dfb565..bbb5d33865 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -32,7 +32,7 @@ using namespace PBD; */ RegionSelection::RegionSelection () { - death_connection = RegionView::RegionViewGoingAway.connect (boost::bind (&RegionSelection::remove_it, this, _1)); + RegionView::RegionViewGoingAway.connect (death_connection, boost::bind (&RegionSelection::remove_it, this, _1)); _current_start = 0; _current_end = 0; @@ -44,7 +44,7 @@ RegionSelection::RegionSelection () RegionSelection::RegionSelection (const RegionSelection& other) : std::list<RegionView*>() { - death_connection = RegionView::RegionViewGoingAway.connect (boost::bind (&RegionSelection::remove_it, this, _1)); + RegionView::RegionViewGoingAway.connect (death_connection, boost::bind (&RegionSelection::remove_it, this, _1)); _current_start = other._current_start; _current_end = other._current_end; diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 5cc4df5669..cdfeceaa8d 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -58,7 +58,7 @@ using namespace ArdourCanvas; static const int32_t sync_mark_width = 9; -boost::signals2::signal<void(RegionView*)> RegionView::RegionViewGoingAway; +PBD::Signal1<void,RegionView*> RegionView::RegionViewGoingAway; RegionView::RegionView (ArdourCanvas::Group* parent, TimeAxisView& tv, @@ -178,8 +178,8 @@ RegionView::init (Gdk::Color const & basic_color, bool wfd) set_height (trackview.current_height()); - _region->StateChanged.connect (sigc::mem_fun(*this, &RegionView::region_changed)); - + _region->StateChanged.connect (*this, boost::bind (&RegionView::region_changed, this, _1)); + group->signal_event().connect (sigc::bind (sigc::mem_fun (PublicEditor::instance(), &PublicEditor::canvas_region_view_event), group, this)); set_colors (); diff --git a/gtk2_ardour/region_view.h b/gtk2_ardour/region_view.h index ad534c04bf..9a663eac02 100644 --- a/gtk2_ardour/region_view.h +++ b/gtk2_ardour/region_view.h @@ -89,7 +89,7 @@ class RegionView : public TimeAxisViewItem void enable_display(bool yn) { _enable_display = yn; } virtual void update_coverage_frames (LayerDisplay); - static boost::signals2::signal<void(RegionView*)> RegionViewGoingAway; + static PBD::Signal1<void,RegionView*> RegionViewGoingAway; protected: @@ -139,7 +139,7 @@ class RegionView : public TimeAxisViewItem bool in_destructor; bool wait_for_data; - boost::signals2::scoped_connection data_ready_connection; + PBD::ScopedConnection data_ready_connection; std::vector<GhostRegion*> ghosts; diff --git a/gtk2_ardour/return_ui.cc b/gtk2_ardour/return_ui.cc index 8a12a3ece9..fe1593a4aa 100644 --- a/gtk2_ardour/return_ui.cc +++ b/gtk2_ardour/return_ui.cc @@ -57,7 +57,7 @@ ReturnUI::ReturnUI (Gtk::Window* parent, boost::shared_ptr<Return> r, Session* s show_all (); _return->set_metering (true); - _return->input()->changed.connect (sigc::mem_fun (*this, &ReturnUI::ins_changed)); + _return->input()->changed.connect (input_change_connection, boost::bind (&ReturnUI::ins_changed, this, _1, _2)); _gpm.setup_meters (); _gpm.set_fader_name ("ReturnUIFrame"); @@ -110,7 +110,7 @@ ReturnUIWindow::ReturnUIWindow (boost::shared_ptr<Return> r, ARDOUR::Session* s) set_name ("ReturnUIWindow"); - going_away_connection = r->GoingAway.connect (sigc::mem_fun (*this, &ReturnUIWindow::return_going_away)); + r->GoingAway.connect (going_away_connection, boost::bind (&ReturnUIWindow::return_going_away, this)); signal_delete_event().connect (sigc::bind (sigc::ptr_fun (just_hide_it), reinterpret_cast<Window *> (this))); } diff --git a/gtk2_ardour/return_ui.h b/gtk2_ardour/return_ui.h index ff1f2f35e5..0f6735c9ea 100644 --- a/gtk2_ardour/return_ui.h +++ b/gtk2_ardour/return_ui.h @@ -52,6 +52,7 @@ class ReturnUI : public Gtk::HBox sigc::connection screen_update_connection; sigc::connection fast_screen_update_connection; + PBD::ScopedConnection input_change_connection; void ins_changed (ARDOUR::IOChange, void*); }; diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index c948d388d8..cf37c2dad4 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -181,8 +181,8 @@ RouteParams_UI::add_routes (RouteList& routes) //route_select_list.rows().back().select (); - scoped_connect (route->NameChanged, boost::bind (&RouteParams_UI::route_name_changed, this, boost::weak_ptr<Route>(route))); - scoped_connect (route->GoingAway, boost::bind (&RouteParams_UI::route_removed, this, boost::weak_ptr<Route>(route))); + route->NameChanged.connect (*this, boost::bind (&RouteParams_UI::route_name_changed, this, boost::weak_ptr<Route>(route))); + route->GoingAway.connect (*this, boost::bind (&RouteParams_UI::route_removed, this, boost::weak_ptr<Route>(route))); } } @@ -293,8 +293,8 @@ RouteParams_UI::setup_latency_frame () latency_packer.pack_start (delay_label); latency_click_connection = latency_apply_button.signal_clicked().connect (sigc::mem_fun (*latency_widget, &LatencyGUI::finish)); - latency_connections.add_connection (_route->signal_latency_changed.connect (sigc::mem_fun (*this, &RouteParams_UI::refresh_latency))); - latency_connections.add_connection ( _route->initial_delay_changed.connect (sigc::mem_fun (*this, &RouteParams_UI::refresh_latency))); + _route->signal_latency_changed.connect (latency_connections, sigc::mem_fun (*this, &RouteParams_UI::refresh_latency)); + _route->initial_delay_changed.connect (latency_connections, sigc::mem_fun (*this, &RouteParams_UI::refresh_latency)); latency_frame.add (latency_packer); latency_frame.show_all (); @@ -399,7 +399,7 @@ RouteParams_UI::set_session (Session *sess) if (_session) { boost::shared_ptr<RouteList> r = _session->get_routes(); add_routes (*r); - _session_connections.add_connection (_session->RouteAdded.connect (sigc::mem_fun(*this, &RouteParams_UI::add_routes))); + _session->RouteAdded.connect (_session_connections, sigc::mem_fun(*this, &RouteParams_UI::add_routes)); start_updating (); } else { stop_updating (); @@ -458,7 +458,7 @@ RouteParams_UI::route_selected() setup_processor_boxes(); setup_latency_frame (); - _route_processors_connection = route->processors_changed.connect (boost::bind (&RouteParams_UI::processors_changed, this, _1)); + route->processors_changed.connect (_route_processors_connection, boost::bind (&RouteParams_UI::processors_changed, this, _1)); track_input_label.set_text (_route->name()); @@ -522,9 +522,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> proc) SendUI *send_ui = new SendUI (this, send, _session); cleanup_view(); - _processor_going_away_connection = send->GoingAway.connect (boost::bind (&RouteParams_UI::processor_going_away, this, - boost::weak_ptr<Processor>(proc))); - + send->GoingAway.connect (_processor_going_away_connection, boost::bind (&RouteParams_UI::processor_going_away, this, boost::weak_ptr<Processor>(proc))); _active_view = send_ui; redir_hpane.add2 (*_active_view); @@ -535,8 +533,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> proc) ReturnUI *return_ui = new ReturnUI (this, retrn, _session); cleanup_view(); - _processor_going_away_connection = retrn->GoingAway.connect (boost::bind (&RouteParams_UI::processor_going_away, this, - boost::weak_ptr<Processor>(proc))); + retrn->GoingAway.connect (_processor_going_away_connection, boost::bind (&RouteParams_UI::processor_going_away, this, boost::weak_ptr<Processor>(proc))); _active_view = return_ui; redir_hpane.add2 (*_active_view); @@ -547,9 +544,10 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> proc) GenericPluginUI *plugin_ui = new GenericPluginUI (plugin_insert, true); cleanup_view(); - _processor_going_away_connection = plugin_insert->plugin()->GoingAway.connect (boost::bind (&RouteParams_UI::plugin_going_away, this, PreFader)); + plugin_insert->plugin()->GoingAway.connect (_processor_going_away_connection, boost::bind (&RouteParams_UI::plugin_going_away, this, PreFader)); plugin_ui->start_updating (0); _active_view = plugin_ui; + redir_hpane.pack2 (*_active_view); redir_hpane.show_all(); @@ -558,8 +556,9 @@ RouteParams_UI::redirect_selected (boost::shared_ptr<ARDOUR::Processor> proc) PortInsertUI *portinsert_ui = new PortInsertUI (this, _session, port_insert); cleanup_view(); - _processor_going_away_connection = port_insert->GoingAway.connect (boost::bind (&RouteParams_UI::processor_going_away, this, boost::weak_ptr<Processor> (proc))); + port_insert->GoingAway.connect (_processor_going_away_connection, boost::bind (&RouteParams_UI::processor_going_away, this, boost::weak_ptr<Processor> (proc))); _active_view = portinsert_ui; + redir_hpane.pack2 (*_active_view); portinsert_ui->redisplay(); redir_hpane.show_all(); diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h index 2dcb1b921d..a1a9323134 100644 --- a/gtk2_ardour/route_params_ui.h +++ b/gtk2_ardour/route_params_ui.h @@ -33,7 +33,7 @@ #include <gtkmm/treeview.h> #include "pbd/stateful.h" -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/ardour.h" diff --git a/gtk2_ardour/route_processor_selection.cc b/gtk2_ardour/route_processor_selection.cc index 102cd724dd..2f4a31a3e0 100644 --- a/gtk2_ardour/route_processor_selection.cc +++ b/gtk2_ardour/route_processor_selection.cc @@ -69,6 +69,7 @@ void RouteRedirectSelection::clear_routes () { routes.clear (); + drop_connections (); RoutesChanged (); } @@ -93,7 +94,7 @@ RouteRedirectSelection::add (boost::shared_ptr<Route> r) { if (find (routes.begin(), routes.end(), r) == routes.end()) { routes.push_back (r); - r->GoingAway.connect (boost::bind (&RouteRedirectSelection::removed, this, boost::weak_ptr<Route>(r))); + r->GoingAway.connect (*this, boost::bind (&RouteRedirectSelection::removed, this, boost::weak_ptr<Route>(r))); RoutesChanged(); } } diff --git a/gtk2_ardour/route_processor_selection.h b/gtk2_ardour/route_processor_selection.h index eb76d481dd..df43019e91 100644 --- a/gtk2_ardour/route_processor_selection.h +++ b/gtk2_ardour/route_processor_selection.h @@ -21,7 +21,7 @@ #define __ardour_gtk_route_processor_selection_h__ #include <vector> -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "processor_selection.h" #include "route_selection.h" diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index e652fbc4a3..442fb959c4 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -193,9 +193,9 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh } controls_hbox.pack_start(gm.get_level_meter(), false, false); - _route->meter_change.connect (sigc::mem_fun(*this, &RouteTimeAxisView::meter_changed)); - _route->input()->changed.connect (sigc::mem_fun(*this, &RouteTimeAxisView::io_changed)); - _route->output()->changed.connect (sigc::mem_fun(*this, &RouteTimeAxisView::io_changed)); + _route->meter_change.connect (*this, boost::bind (&RouteTimeAxisView::meter_changed, this, _1)); + _route->input()->changed.connect (*this, boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2)); + _route->output()->changed.connect (*this, boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2)); controls_table.attach (*mute_button, 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0); controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0); @@ -234,19 +234,19 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh _y_position = -1; - _route->mute_changed.connect (sigc::mem_fun(*this, &RouteUI::mute_changed)); - _route->solo_changed.connect (sigc::mem_fun(*this, &RouteUI::solo_changed)); - _route->processors_changed.connect (sigc::mem_fun(*this, &RouteTimeAxisView::processors_changed)); - _route->NameChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::route_name_changed)); - _route->solo_isolated_changed.connect (sigc::mem_fun(*this, &RouteUI::solo_changed)); + _route->mute_changed.connect (*this, boost::bind (&RouteUI::mute_changed, this, _1)); + _route->solo_changed.connect (*this, boost::bind (&RouteUI::solo_changed, this, _1)); + _route->processors_changed.connect (*this, boost::bind (&RouteTimeAxisView::processors_changed, this, _1)); + _route->NameChanged.connect (*this, boost::bind (&RouteTimeAxisView::route_name_changed, this)); + _route->solo_isolated_changed.connect (*this, boost::bind (&RouteUI::solo_changed, this, _1)); if (is_track()) { - track()->TrackModeChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::track_mode_changed)); - track()->FreezeChange.connect (sigc::mem_fun(*this, &RouteTimeAxisView::map_frozen)); - track()->DiskstreamChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::diskstream_changed)); - get_diskstream()->SpeedChanged.connect (sigc::mem_fun(*this, &RouteTimeAxisView::speed_changed)); + track()->TrackModeChanged.connect (*this, boost::bind (&RouteTimeAxisView::track_mode_changed, this)); + track()->FreezeChange.connect (*this, boost::bind (&RouteTimeAxisView::map_frozen, this)); + track()->DiskstreamChanged.connect (*this, boost::bind (&RouteTimeAxisView::diskstream_changed, this)); + get_diskstream()->SpeedChanged.connect (*this, boost::bind (&RouteTimeAxisView::speed_changed, this)); /* pick up the correct freeze state */ map_frozen (); @@ -270,6 +270,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, boost::sh RouteTimeAxisView::~RouteTimeAxisView () { drop_references (); + drop_connections (); for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) { delete *i; @@ -531,8 +532,7 @@ RouteTimeAxisView::build_display_menu () if (!Profile->get_sae()) { items.push_back (MenuElem (_("Alignment"), *alignment_menu)); - get_diskstream()->AlignmentStyleChanged.connect ( - sigc::mem_fun(*this, &RouteTimeAxisView::align_style_changed)); + get_diskstream()->AlignmentStyleChanged.connect (route_connections, boost::bind (&RouteTimeAxisView::align_style_changed, this)); RadioMenuItem::Group mode_group; items.push_back (RadioMenuElem (mode_group, _("Normal mode"), sigc::bind ( @@ -564,8 +564,7 @@ RouteTimeAxisView::build_display_menu () } } - get_diskstream()->AlignmentStyleChanged.connect ( - sigc::mem_fun(*this, &RouteTimeAxisView::align_style_changed)); + get_diskstream()->AlignmentStyleChanged.connect (route_connections, boost::bind (&RouteTimeAxisView::align_style_changed, this)); mode_menu = build_mode_menu(); if (mode_menu) diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index c4fe713f58..3eb72a9b53 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -136,17 +136,17 @@ RouteUI::init () show_sends_button->set_self_managed (true); UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), ""); - _session_connections.add_connection (_session->SoloChanged.connect (sigc::mem_fun(*this, &RouteUI::solo_changed_so_update_mute))); - _session_connections.add_connection (_session->TransportStateChange.connect (sigc::mem_fun (*this, &RouteUI::check_rec_enable_sensitivity))); + _session->SoloChanged.connect (_session_connections, sigc::mem_fun(*this, &RouteUI::solo_changed_so_update_mute)); + _session->TransportStateChange.connect (_session_connections, sigc::mem_fun (*this, &RouteUI::check_rec_enable_sensitivity)); + _session->RecordStateChanged.connect (_session_connections, boost::bind (&RouteUI::session_rec_enable_changed, this)); - Config->ParameterChanged.connect (sigc::mem_fun (*this, &RouteUI::parameter_changed)); + Config->ParameterChanged.connect (*this, boost::bind (&RouteUI::parameter_changed, this, _1)); } void RouteUI::reset () { - route_going_away_connection.disconnect(); - connections.drop_connections (); + route_connections.drop_connections (); delete solo_menu; solo_menu = 0; @@ -172,8 +172,7 @@ RouteUI::self_delete () cerr << "\n\nExpect to see route " << _route->name() << " be deleted\n"; _route.reset (); /* drop reference to route, so that it can be cleaned up */ - route_going_away_connection.disconnect (); - connections.drop_connections (); + route_connections.drop_connections (); delete_when_idle (this); } @@ -189,23 +188,22 @@ RouteUI::set_route (boost::shared_ptr<Route> rp) } if (self_destruct) { - route_going_away_connection = rp->GoingAway.connect (boost::bind (&RouteUI::self_delete, this)); + rp->GoingAway.connect (route_connections, boost::bind (&RouteUI::self_delete, this)); } mute_button->set_controllable (_route->mute_control()); solo_button->set_controllable (_route->solo_control()); - connections.add_connection (_route->active_changed.connect (sigc::mem_fun (*this, &RouteUI::route_active_changed))); - connections.add_connection (_route->mute_changed.connect (sigc::mem_fun(*this, &RouteUI::mute_changed))); - connections.add_connection (_route->solo_changed.connect (sigc::mem_fun(*this, &RouteUI::solo_changed))); - connections.add_connection (_route->listen_changed.connect (sigc::mem_fun(*this, &RouteUI::listen_changed))); - connections.add_connection (_route->solo_isolated_changed.connect (sigc::mem_fun(*this, &RouteUI::solo_changed))); + _route->active_changed.connect (route_connections, boost::bind (&RouteUI::route_active_changed, this)); + _route->mute_changed.connect (route_connections, boost::bind (&RouteUI::mute_changed, this, _1)); + _route->solo_changed.connect (route_connections, boost::bind (&RouteUI::solo_changed, this, _1)); + _route->listen_changed.connect (route_connections, boost::bind (&RouteUI::listen_changed, this, _1)); + _route->solo_isolated_changed.connect (route_connections, boost::bind (&RouteUI::solo_changed, this, _1)); if (_session->writable() && is_track()) { boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route); - connections.add_connection (t->diskstream()->RecordEnableChanged.connect (sigc::mem_fun (*this, &RouteUI::route_rec_enable_changed))); - connections.add_connection (_session->RecordStateChanged.connect (sigc::mem_fun (*this, &RouteUI::session_rec_enable_changed))); + t->diskstream()->RecordEnableChanged.connect (route_connections, boost::bind (&RouteUI::route_rec_enable_changed, this)); rec_enable_button->show(); rec_enable_button->set_controllable (t->rec_enable_control()); @@ -832,12 +830,20 @@ RouteUI::route_rec_enable_changed () void RouteUI::session_rec_enable_changed () { + if (!rec_enable_button) { + return; + } + Gtkmm2ext::UI::instance()->call_slot (boost::bind (&RouteUI::update_rec_display, this)); } void RouteUI::update_rec_display () { + if (!rec_enable_button) { + return; + } + bool model = _route->record_enabled(); bool view = rec_enable_button->get_active(); @@ -887,14 +893,14 @@ RouteUI::build_solo_menu (void) check = new CheckMenuItem(_("Solo Isolate")); check->set_active (_route->solo_isolated()); check->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_solo_isolated), check)); - _route->solo_isolated_changed.connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::solo_isolated_toggle), check)); + _route->solo_isolated_changed.connect (route_connections, boost::bind (&RouteUI::solo_isolated_toggle, this, _1, check)); items.push_back (CheckMenuElem(*check)); check->show_all(); check = new CheckMenuItem(_("Solo Safe")); check->set_active (_route->solo_safe()); check->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &RouteUI::toggle_solo_safe), check)); - _route->solo_safe_changed.connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::solo_safe_toggle), check)); + _route->solo_safe_changed.connect (route_connections, boost::bind (&RouteUI::solo_safe_toggle, this, _1, check)); items.push_back (CheckMenuElem(*check)); check->show_all(); @@ -940,7 +946,7 @@ RouteUI::build_mute_menu(void) //items.push_back (SeparatorElem()); // items.push_back (MenuElem (_("MIDI Bind"), sigc::mem_fun (*mute_button, &BindableToggleButton::midi_learn))); - _route->mute_points_changed.connect (sigc::mem_fun (*this, &RouteUI::muting_change)); + _route->mute_points_changed.connect (route_connections, boost::bind (&RouteUI::muting_change, this)); } void diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index a4d7e43b7d..12a1cde703 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -23,7 +23,7 @@ #include <list> #include "pbd/xml++.h" -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/ardour.h" #include "ardour/mute_master.h" @@ -199,8 +199,7 @@ class RouteUI : public virtual AxisView static int mute_visual_state (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>); protected: - PBD::ScopedConnectionList connections; - boost::signals2::scoped_connection route_going_away_connection; + PBD::ScopedConnectionList route_connections; bool self_destruct; void init (); diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index d2f1a67476..05cd154831 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -209,7 +209,7 @@ Selection::toggle (TimeAxisView* track) if ((i = find (tracks.begin(), tracks.end(), track)) == tracks.end()) { void (Selection::*pmf)(TimeAxisView*) = &Selection::remove; - track->GoingAway.connect (boost::bind (pmf, this, track)); + track->GoingAway.connect (*this, boost::bind (pmf, this, track)); tracks.push_back (track); } else { tracks.erase (i); @@ -338,7 +338,7 @@ Selection::add (const TrackViewList& track_list) for (list<TimeAxisView*>::const_iterator i = added.begin(); i != added.end(); ++i) { void (Selection::*pmf)(TimeAxisView*) = &Selection::remove; - scoped_connect ((*i)->GoingAway, boost::bind (pmf, this, (*i))); + (*i)->GoingAway.connect (*this, boost::bind (pmf, this, (*i))); } if (!added.empty()) { @@ -949,7 +949,7 @@ Selection::add (Marker* m) void (Selection::*pmf)(Marker*) = &Selection::remove; - scoped_connect (m->GoingAway, boost::bind (pmf, this, m)); + m->GoingAway.connect (*this, boost::bind (pmf, this, m)); markers.push_back (m); MarkersChanged(); diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h index ad257e0848..d838720d36 100644 --- a/gtk2_ardour/selection.h +++ b/gtk2_ardour/selection.h @@ -22,10 +22,11 @@ #include <vector> #include <boost/shared_ptr.hpp> +#include <boost/noncopyable.hpp> #include <sigc++/signal.h> -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "time_selection.h" #include "region_selection.h" @@ -187,7 +188,6 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList template<class A> void foreach_region (void (ARDOUR::Region::*method)(A), A arg); private: - Selection (const Selection& other) : tracks (other.tracks) {} PublicEditor const * editor; uint32_t next_time_id; diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 1617ccd96a..4c1bb9fec3 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -61,8 +61,8 @@ SendUI::SendUI (Gtk::Window* parent, boost::shared_ptr<Send> s, Session* session _send->set_metering (true); - _send->input()->changed.connect (sigc::mem_fun (*this, &SendUI::ins_changed)); - _send->output()->changed.connect (sigc::mem_fun (*this, &SendUI::outs_changed)); + _send->input()->changed.connect (connections, boost::bind (&SendUI::ins_changed, this, _1, _2)); + _send->output()->changed.connect (connections, boost::bind (&SendUI::outs_changed, this, _1, _2)); _panners.set_width (Wide); _panners.setup_pan (); @@ -130,7 +130,7 @@ SendUIWindow::SendUIWindow (boost::shared_ptr<Send> s, Session* session) set_name ("SendUIWindow"); - going_away_connection = s->GoingAway.connect (sigc::mem_fun (*this, &SendUIWindow::send_going_away)); + s->GoingAway.connect (going_away_connection, boost::bind (&SendUIWindow::send_going_away, this)); signal_delete_event().connect (sigc::bind ( sigc::ptr_fun (just_hide_it), diff --git a/gtk2_ardour/send_ui.h b/gtk2_ardour/send_ui.h index 16543140a8..2c71466518 100644 --- a/gtk2_ardour/send_ui.h +++ b/gtk2_ardour/send_ui.h @@ -56,6 +56,7 @@ class SendUI : public Gtk::HBox void ins_changed (ARDOUR::IOChange, void*); void outs_changed (ARDOUR::IOChange, void*); + PBD::ScopedConnectionList connections; }; class SendUIWindow : public ArdourDialog diff --git a/gtk2_ardour/session_import_dialog.cc b/gtk2_ardour/session_import_dialog.cc index 4b5793271b..5b6b8a71b4 100644 --- a/gtk2_ardour/session_import_dialog.cc +++ b/gtk2_ardour/session_import_dialog.cc @@ -92,8 +92,8 @@ SessionImportDialog::SessionImportDialog (ARDOUR::Session* target) : ok_button->signal_clicked().connect (sigc::mem_fun (*this, &SessionImportDialog::do_merge)); // prompt signals - ElementImporter::Rename.connect (sigc::mem_fun (*this, &SessionImportDialog::open_rename_dialog)); - ElementImporter::Prompt.connect (sigc::mem_fun (*this, &SessionImportDialog::open_prompt_dialog)); + ElementImporter::Rename.connect (connections, boost::bind (&SessionImportDialog::open_rename_dialog, this, _1, _2)); + ElementImporter::Prompt.connect (connections, boost::bind (&SessionImportDialog::open_prompt_dialog, this, _1)); // Finalize show_all(); diff --git a/gtk2_ardour/session_import_dialog.h b/gtk2_ardour/session_import_dialog.h index 01cbb6c0cc..ebfd49f8c9 100644 --- a/gtk2_ardour/session_import_dialog.h +++ b/gtk2_ardour/session_import_dialog.h @@ -93,6 +93,8 @@ class SessionImportDialog : public ArdourDialog Gtk::Button* ok_button; Gtk::Button* cancel_button; + + PBD::ScopedConnectionList connections; }; #endif diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc index 08cd8ef260..2cc6e253ba 100644 --- a/gtk2_ardour/session_option_editor.cc +++ b/gtk2_ardour/session_option_editor.cc @@ -160,9 +160,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s) sigc::mem_fun (*_session_config, &SessionConfiguration::set_sync_source) ); - s->MTC_PortChanged.connect (sigc::bind (sigc::mem_fun (*this, &SessionOptionEditor::populate_sync_options), s, ssrc)); - s->MIDIClock_PortChanged.connect (sigc::bind (sigc::mem_fun (*this, &SessionOptionEditor::populate_sync_options), s, ssrc)); - s->config.ParameterChanged.connect (sigc::bind (sigc::mem_fun (*this, &SessionOptionEditor::follow_sync_state), s, ssrc)); + s->MTC_PortChanged.connect (_session_connections, boost::bind (&SessionOptionEditor::populate_sync_options, this, s, ssrc)); + s->MIDIClock_PortChanged.connect (_session_connections, boost::bind (&SessionOptionEditor::populate_sync_options, this, s, ssrc)); + s->config.ParameterChanged.connect (_session_connections, boost::bind (&SessionOptionEditor::follow_sync_state, this, _1, s, ssrc)); populate_sync_options (s, ssrc); follow_sync_state (string ("external-sync"), s, ssrc); diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index f76ded4feb..6489efcdf7 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -56,7 +56,7 @@ Splash::Splash () set_default_size (pixbuf->get_width(), pixbuf->get_height()); the_splash = this; - ARDOUR::BootMessage.connect (sigc::mem_fun (*this, &Splash::boot_message)); + ARDOUR::BootMessage.connect (msg_connection, boost::bind (&Splash::boot_message, this, _1)); } void diff --git a/gtk2_ardour/splash.h b/gtk2_ardour/splash.h index 1c645d31cb..56e159ebde 100644 --- a/gtk2_ardour/splash.h +++ b/gtk2_ardour/splash.h @@ -26,6 +26,8 @@ #include <gtkmm/label.h> #include <gdkmm/pixbuf.h> +#include "pbd/signals.h" + class ARDOUR_UI; class Splash : public Gtk::Window @@ -52,6 +54,7 @@ class Splash : public Gtk::Window Glib::RefPtr<Pango::Layout> layout; void boot_message (std::string); + PBD::ScopedConnection msg_connection; }; #endif /* __ardour_gtk_splash_h__ */ diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 4190116294..39f98582c7 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -79,12 +79,12 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group) canvas_rect, &_trackview)); if (_trackview.is_track()) { - scoped_connect (_trackview.track()->DiskstreamChanged, boost::bind (&StreamView::diskstream_changed, this)); - scoped_connect (_trackview.get_diskstream()->RecordEnableChanged, boost::bind (&StreamView::rec_enable_changed, this)); + _trackview.track()->DiskstreamChanged.connect (*this, boost::bind (&StreamView::diskstream_changed, this)); + _trackview.get_diskstream()->RecordEnableChanged.connect (*this, boost::bind (&StreamView::rec_enable_changed, this)); - scoped_connect (_trackview.session()->TransportStateChange, boost::bind (&StreamView::transport_changed, this)); - scoped_connect (_trackview.session()->TransportLooped, boost::bind (&StreamView::transport_looped, this)); - scoped_connect (_trackview.session()->RecordStateChanged, boost::bind (&StreamView::sess_rec_enable_changed, this)); + _trackview.session()->TransportStateChange.connect (*this, boost::bind (&StreamView::transport_changed, this)); + _trackview.session()->TransportLooped.connect (*this, boost::bind (&StreamView::transport_looped, this)); + _trackview.session()->RecordStateChanged.connect (*this, boost::bind (&StreamView::sess_rec_enable_changed, this)); } ColorsChanged.connect (sigc::mem_fun (*this, &StreamView::color_handler)); @@ -231,7 +231,7 @@ StreamView::display_diskstream (boost::shared_ptr<Diskstream> ds) { playlist_change_connection.disconnect(); playlist_changed (ds); - playlist_change_connection = ds->PlaylistChanged.connect (boost::bind (&StreamView::playlist_changed_weak, this, boost::weak_ptr<Diskstream> (ds))); + ds->PlaylistChanged.connect (playlist_change_connection, boost::bind (&StreamView::playlist_changed_weak, this, boost::weak_ptr<Diskstream> (ds))); } void @@ -353,9 +353,9 @@ StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds) /* catch changes */ - playlist_connections.add_connection (ds->playlist()->Modified.connect (boost::bind (&StreamView::playlist_modified_weak, this, ds))); - playlist_connections.add_connection (ds->playlist()->RegionAdded.connect (boost::bind (&StreamView::add_region_view_weak, this, _1))); - playlist_connections.add_connection (ds->playlist()->RegionRemoved.connect (boost::bind (&StreamView::remove_region_view, this, _1))); + ds->playlist()->Modified.connect (playlist_connections, boost::bind (&StreamView::playlist_modified_weak, this, ds)); + ds->playlist()->RegionAdded.connect (playlist_connections, boost::bind (&StreamView::add_region_view_weak, this, _1)); + ds->playlist()->RegionRemoved.connect (playlist_connections, boost::bind (&StreamView::remove_region_view, this, _1)); } void diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h index 0fe0b1a9ed..effb9431d0 100644 --- a/gtk2_ardour/streamview.h +++ b/gtk2_ardour/streamview.h @@ -22,7 +22,7 @@ #include <list> #include <cmath> -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/location.h" #include "enums.h" diff --git a/gtk2_ardour/tape_region_view.cc b/gtk2_ardour/tape_region_view.cc index 7397997a38..6fd2570c27 100644 --- a/gtk2_ardour/tape_region_view.cc +++ b/gtk2_ardour/tape_region_view.cc @@ -71,7 +71,7 @@ TapeAudioRegionView::init (Gdk::Color const & basic_color, bool /*wfw*/) /* every time the wave data changes and peaks are ready, redraw */ for (uint32_t n = 0; n < audio_region()->n_channels(); ++n) { - audio_region()->audio_source(n)->PeaksReady.connect (sigc::bind (sigc::mem_fun(*this, &TapeAudioRegionView::update), n)); + audio_region()->audio_source(n)->PeaksReady.connect (*this, boost::bind (&TapeAudioRegionView::update, this, n)); } } diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index e1368dc5f3..d3e3e88003 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -924,7 +924,7 @@ TimeAxisView::add_ghost (RegionView* rv) if(gr) { ghosts.push_back(gr); - scoped_connect (gr->GoingAway, boost::bind (&TimeAxisView::erase_ghost, this, _1)); + gr->GoingAway.connect (*this, boost::bind (&TimeAxisView::erase_ghost, this, _1)); } } diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 67aaa0d327..3ad033417b 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -34,7 +34,7 @@ #include <gtkmm2ext/focus_entry.h> #include "pbd/stateful.h" -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "ardour/types.h" #include "ardour/region.h" diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index 1dd16043ad..2e36f29fcf 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -25,7 +25,7 @@ #include <libgnomecanvasmm/pixbuf.h> -#include "pbd/scoped_connections.h" +#include "pbd/signals.h" #include "selectable.h" #include "simplerect.h" |