From f6fdd8dcbf41f864e9f0cc32dabe81fe3533ddfe Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Dec 2009 18:24:23 +0000 Subject: 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 --- gtk2_ardour/automation_time_axis.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'gtk2_ardour/automation_time_axis.cc') diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 3184033dca..aee9b70726 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -58,7 +58,7 @@ const string AutomationTimeAxisView::state_node_name = "AutomationChild"; * For route child (e.g. plugin) automation, pass the child for \a. * For region automation (e.g. MIDI CC), pass null for \a. */ -AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr r, +AutomationTimeAxisView::AutomationTimeAxisView (Session* s, boost::shared_ptr r, boost::shared_ptr a, boost::shared_ptr c, PublicEditor& e, TimeAxisView& parent, bool show_regions, ArdourCanvas::Canvas& canvas, const string & nom, const string & nomparent) @@ -370,11 +370,11 @@ AutomationTimeAxisView::set_interpolation (AutomationList::InterpolationStyle st void AutomationTimeAxisView::clear_clicked () { - _session.begin_reversible_command (_("clear automation")); + _session->begin_reversible_command (_("clear automation")); if (_line) { _line->clear (); } - _session.commit_reversible_command (); + _session->commit_reversible_command (); } void @@ -587,15 +587,15 @@ AutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* /*item*/, GdkE _line->view_to_model_coord (x, y); - _session.begin_reversible_command (_("add automation event")); + _session->begin_reversible_command (_("add automation event")); XMLNode& before = _control->alist()->get_state(); _control->alist()->add (when, y); XMLNode& after = _control->alist()->get_state(); - _session.commit_reversible_command (new MementoCommand(*_control->alist(), &before, &after)); + _session->commit_reversible_command (new MementoCommand(*_control->alist(), &before, &after)); - _session.set_dirty (); + _session->set_dirty (); } bool @@ -617,7 +617,7 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel case Cut: if ((what_we_got = alist->cut (selection.time.front().start, selection.time.front().end)) != 0) { _editor.get_cut_buffer().add (what_we_got); - _session.add_command(new MementoCommand(*alist.get(), &before, &alist->get_state())); + _session->add_command(new MementoCommand(*alist.get(), &before, &alist->get_state())); ret = true; } break; @@ -629,7 +629,7 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel case Clear: if ((what_we_got = alist->cut (selection.time.front().start, selection.time.front().end)) != 0) { - _session.add_command(new MementoCommand(*alist.get(), &before, &alist->get_state())); + _session->add_command(new MementoCommand(*alist.get(), &before, &alist->get_state())); ret = true; } break; @@ -659,11 +659,11 @@ AutomationTimeAxisView::reset_objects_one (AutomationLine& line, PointSelection& { boost::shared_ptr alist(line.the_list()); - _session.add_command (new MementoCommand(*alist.get(), &alist->get_state(), 0)); + _session->add_command (new MementoCommand(*alist.get(), &alist->get_state(), 0)); for (PointSelection::iterator i = selection.begin(); i != selection.end(); ++i) { - if (&(*i).track != this) { + if ((*i).track != this) { continue; } @@ -688,7 +688,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS for (PointSelection::iterator i = selection.begin(); i != selection.end(); ++i) { - if (&(*i).track != this) { + if ((*i).track != this) { continue; } @@ -696,7 +696,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS case Cut: if ((what_we_got = alist->cut ((*i).start, (*i).end)) != 0) { _editor.get_cut_buffer().add (what_we_got); - _session.add_command (new MementoCommand(*alist.get(), new XMLNode (before), &alist->get_state())); + _session->add_command (new MementoCommand(*alist.get(), new XMLNode (before), &alist->get_state())); ret = true; } break; @@ -708,7 +708,7 @@ AutomationTimeAxisView::cut_copy_clear_objects_one (AutomationLine& line, PointS case Clear: if ((what_we_got = alist->cut ((*i).start, (*i).end)) != 0) { - _session.add_command (new MementoCommand(*alist.get(), new XMLNode (before), &alist->get_state())); + _session->add_command (new MementoCommand(*alist.get(), new XMLNode (before), &alist->get_state())); ret = true; } break; @@ -765,7 +765,7 @@ AutomationTimeAxisView::paste_one (AutomationLine& line, nframes_t pos, float ti XMLNode &before = alist->get_state(); alist->paste (copy, pos, times); - _session.add_command (new MementoCommand(*alist.get(), &before, &alist->get_state())); + _session->add_command (new MementoCommand(*alist.get(), &before, &alist->get_state())); return true; } @@ -834,7 +834,7 @@ AutomationTimeAxisView::add_line (boost::shared_ptr line) assert(line->the_list() == _control->list()); automation_connection = _control->alist()->automation_state_changed.connect - (sigc::mem_fun(*this, &AutomationTimeAxisView::automation_state_changed)); + (boost::bind (&AutomationTimeAxisView::automation_state_changed, this)); _line = line; //_controller = AutomationController::create(_session, line->the_list(), _control); -- cgit v1.2.3