diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-17 18:24:23 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-17 18:24:23 +0000 |
commit | f6fdd8dcbf41f864e9f0cc32dabe81fe3533ddfe (patch) | |
tree | 5214c580b9e6c17a499fa587660dbf949e892bf2 /gtk2_ardour/panner_ui.cc | |
parent | da762129f19c28aff64f833b6ec09fba946faef6 (diff) |
switch to using boost::signals2 instead of sigc++, at least for libardour. not finished yet, but compiles, loads sessions, records and can close a session without a crash
git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/panner_ui.cc')
-rw-r--r-- | gtk2_ardour/panner_ui.cc | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 3c2cfafdfe..7e80c9e641 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -48,19 +48,20 @@ using namespace Gtk; const int PannerUI::pan_bar_height = 30; -PannerUI::PannerUI (Session& s) - : _session (s), - _current_nouts (-1), - _current_npans (-1), - hAdjustment(0.0, 0.0, 0.0), - vAdjustment(0.0, 0.0, 0.0), - panning_viewport(hAdjustment, vAdjustment), - panning_up_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT), - panning_down_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT), - panning_link_button (_("link")), - pan_automation_style_button (""), - pan_automation_state_button ("") -{ +PannerUI::PannerUI (Session* s) + : _current_nouts (-1) + , _current_npans (-1) + , hAdjustment(0.0, 0.0, 0.0) + , vAdjustment(0.0, 0.0, 0.0) + , panning_viewport(hAdjustment, vAdjustment) + , panning_up_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT) + , panning_down_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT) + , panning_link_button (_("link")) + , pan_automation_style_button ("") + , pan_automation_state_button ("") +{ + set_session (s); + ignore_toggle = false; pan_menu = 0; pan_astate_menu = 0; @@ -133,7 +134,7 @@ PannerUI::PannerUI (Session& s) void PannerUI::set_panner (boost::shared_ptr<Panner> p) { - connections.clear (); + connections.drop_connections (); delete pan_astyle_menu; pan_astyle_menu = 0; @@ -150,9 +151,9 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p) return; } - connections.push_back (_panner->Changed.connect (sigc::mem_fun(*this, &PannerUI::panner_changed))); - connections.push_back (_panner->LinkStateChanged.connect (sigc::mem_fun(*this, &PannerUI::update_pan_linkage))); - connections.push_back (_panner->StateChanged.connect (sigc::mem_fun(*this, &PannerUI::update_pan_state))); + 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))); setup_pan (); @@ -644,7 +645,7 @@ PannerUI::pan_adjustment_changed (uint32_t which) the panner objects have no access to the session, so do this here. ick. */ - _session.set_dirty(); + _session->set_dirty(); } } } |