diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-22 17:03:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-22 17:03:00 +0000 |
commit | 3aa346b253d515c3d0715ec5e0fa8b6ad477c4e5 (patch) | |
tree | a41d4380ad270324a2d05cbbab0d1e57dce2bdfe /gtk2_ardour/editor_canvas.cc | |
parent | 004a49b0c7051a4d0f8972b0aff0ef8fa9cab03d (diff) |
significant changes in code to handle import/embedding - much cleaner and less code, plus the import progress bar now works; unify response handling for Gtkmm2ext::Choice
git-svn-id: svn://localhost/trunk/ardour2@415 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index c18bf867cd..92844124bd 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -455,7 +455,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context, TimeAxisView* tvp; AudioTimeAxisView* tv; double cy; - vector<string> paths; + vector<ustring> paths; string spath; GdkEvent ev; jack_nframes_t frame; @@ -484,22 +484,18 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context, if ((tvp = trackview_by_y_position (cy)) == 0) { - /* drop onto canvas background: create a new track */ - - insert_paths_as_new_tracks (paths, false); + /* drop onto canvas background: create new tracks */ + jack_nframes_t pos = 0; + do_embed (paths, false, ImportAsTrack, 0, pos, false); } else if ((tv = dynamic_cast<AudioTimeAxisView*>(tvp)) != 0) { /* check that its an audio track, not a bus */ - + if (tv->get_diskstream()) { - - for (vector<string>::iterator p = paths.begin(); p != paths.end(); ++p) { - insert_sndfile_into (*p, true, tv, frame); - } + do_embed (paths, false, ImportToTrack, tv->audio_track(), frame, true); } - } out: |