diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-03 00:23:34 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-03 00:23:34 +0000 |
commit | a75e811edb7aa1da6359f5e2a104e582e2848e47 (patch) | |
tree | ecce91c408e9ef9cade62c2f055b73e67a648809 /gtk2_ardour | |
parent | 27915ccdc07d4463daa1fbf61d3d6764e0aea67e (diff) |
Use sigc::slots rather than templates + function ptrs for a foreach_region and foreach_crossfade.
git-svn-id: svn://localhost/ardour2/branches/3.0@5118 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_streamview.cc | 14 | ||||
-rw-r--r-- | gtk2_ardour/automation_streamview.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/crossfade_edit.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/midi_streamview.cc | 8 |
4 files changed, 15 insertions, 13 deletions
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index 19e2e2368b..03f3d3d8bd 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -29,7 +29,6 @@ #include "ardour/audiofilesource.h" #include "ardour/audio_diskstream.h" #include "ardour/audio_track.h" -#include "ardour/playlist_templates.h" #include "ardour/source.h" #include "ardour/region_factory.h" #include "ardour/profile.h" @@ -401,13 +400,16 @@ AudioStreamView::redisplay_diskstream () if (_trackview.is_audio_track()) { _trackview.get_diskstream()->playlist()->foreach_region( - static_cast<StreamView*>(this), - &StreamView::add_region_view); + sigc::mem_fun (*this, &StreamView::add_region_view) + ); boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist>( - _trackview.get_diskstream()->playlist()); - if (apl) - apl->foreach_crossfade (this, &AudioStreamView::add_crossfade); + _trackview.get_diskstream()->playlist() + ); + + if (apl) { + apl->foreach_crossfade (sigc::mem_fun (*this, &AudioStreamView::add_crossfade)); + } } // Remove invalid crossfade views diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc index c36085a77c..0ba49fd2d9 100644 --- a/gtk2_ardour/automation_streamview.cc +++ b/gtk2_ardour/automation_streamview.cc @@ -167,7 +167,8 @@ AutomationStreamView::redisplay_diskstream () // Add and display region views, and flag them as valid if (_trackview.is_track()) { _trackview.get_diskstream()->playlist()->foreach_region ( - static_cast<StreamView*>(this), &StreamView::add_region_view); + sigc::mem_fun (*this, &StreamView::add_region_view) + ); } // Stack regions by layer, and remove invalid regions diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc index 6b6c47f218..e239ad9fdf 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -34,7 +34,6 @@ #include "ardour/auditioner.h" #include "ardour/audioplaylist.h" #include "ardour/audiosource.h" -#include "ardour/playlist_templates.h" #include "ardour/region_factory.h" #include "ardour/profile.h" @@ -1234,7 +1233,7 @@ CrossfadeEditor::audition (Audition which) } /* there is only one ... */ - pl.foreach_crossfade (this, &CrossfadeEditor::setup); + pl.foreach_crossfade (sigc::mem_fun (*this, &CrossfadeEditor::setup)); session.audition_playlist (); } diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 047020ea62..b7fa88404e 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -243,8 +243,8 @@ MidiStreamView::redisplay_diskstream () _data_note_min = 127; _data_note_max = 0; _trackview.get_diskstream()->playlist()->foreach_region( - static_cast<StreamView*>(this), - &StreamView::update_contents_metrics); + sigc::mem_fun (*this, &StreamView::update_contents_metrics) + ); // No notes, use default range if (!_range_dirty) { @@ -266,8 +266,8 @@ MidiStreamView::redisplay_diskstream () // Add and display region views, and flag them as valid _trackview.get_diskstream()->playlist()->foreach_region( - static_cast<StreamView*>(this), - &StreamView::add_region_view); + sigc::mem_fun (*this, &StreamView::add_region_view) + ); // Stack regions by layer, and remove invalid regions layer_regions(); |