summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_region_list.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-02-12 02:51:51 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-02-12 02:51:51 +0000
commita1955a82e81816161f5b7dbf460a694e902237b0 (patch)
tree3c576a733aed52ff02a8fdc9786838bdea7758d2 /gtk2_ardour/editor_region_list.cc
parent7999372faccab884b4e652da83702d7ec252e14b (diff)
AU GUIs basically working, though unfinished; push up dialog for massive split operations (still in progress); fix problem where peakfile is slightly older than audio data even though it is ready to use (debugging output still present); move sync-menu code to libs/gtkmm2ext for linkage reasons; prevent flush_pending() calls from "top menu" items on OS X from locking the GUI; try to make adding lots of regions (e.g. from split-at-points) scale a bit better; SAE version has no timecode mode for audio clocks
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3038 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_region_list.cc')
-rw-r--r--gtk2_ardour/editor_region_list.cc31
1 files changed, 18 insertions, 13 deletions
diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc
index 6f54165900..ec452559cd 100644
--- a/gtk2_ardour/editor_region_list.cc
+++ b/gtk2_ardour/editor_region_list.cc
@@ -58,20 +58,10 @@ Editor::handle_audio_region_removed (boost::weak_ptr<AudioRegion> wregion)
}
void
-Editor::handle_new_audio_region (boost::weak_ptr<AudioRegion> wregion)
+Editor::handle_new_audio_regions (vector<boost::weak_ptr<AudioRegion> >& v)
{
- ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_audio_region), wregion));
-
- /* don't copy region - the one we are being notified
- about belongs to the session, and so it will
- never be edited.
- */
-
- boost::shared_ptr<AudioRegion> region (wregion.lock());
-
- if (region) {
- add_audio_region_to_region_display (region);
- }
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &Editor::handle_new_audio_regions), v));
+ add_audio_regions_to_region_display (v);
}
void
@@ -83,6 +73,21 @@ Editor::region_hidden (boost::shared_ptr<Region> r)
}
void
+Editor::add_audio_regions_to_region_display (vector<boost::weak_ptr<AudioRegion> >& regions)
+{
+ cerr << "Adding " << regions.size() << " to region list\n";
+
+ region_list_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
+ for (vector<boost::weak_ptr<AudioRegion> >::iterator x = regions.begin(); x != regions.end(); ++x) {
+ boost::shared_ptr<AudioRegion> region ((*x).lock());
+ if (region) {
+ add_audio_region_to_region_display (region);
+ }
+ }
+ region_list_display.set_model (region_list_model);
+}
+
+void
Editor::add_audio_region_to_region_display (boost::shared_ptr<AudioRegion> region)
{
string str;