From 3b91a592be371e25c6c135664ba0af2f484431ab Mon Sep 17 00:00:00 2001 From: Taybin Rutkin Date: Wed, 12 Oct 2005 21:59:45 +0000 Subject: split sfdb_v3 into 3 classes. git-svn-id: svn://localhost/trunk/ardour2@59 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_ops.cc | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'gtk2_ardour/editor_ops.cc') diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 4bda1f8367..30b25c55ed 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -59,7 +59,7 @@ #include "rgb_macros.h" #include "selection_templates.h" #include "selection.h" -#include "library_ui.h" +#include "sfdb_ui.h" #include "editing.h" #include "gtk-custom-hruler.h" @@ -1891,20 +1891,21 @@ Editor::import_audio (bool as_tracks) return; } - SoundFileSelector& sfdb (ARDOUR_UI::instance()->get_sfdb_window()); - sigc::connection c; string str; if (as_tracks) { - c = sfdb.Action.connect (bind (mem_fun(*this, &Editor::do_import), true)); str =_("Import selected as tracks"); } else { - c = sfdb.Action.connect (bind (mem_fun(*this, &Editor::do_import), false)); str = _("Import selected to region list"); } - sfdb.run (str, true); - c.disconnect (); + SoundFileChooser sfdb (str, true, true); + + int result = sfdb.run(); + + if (result == Gtk::RESULT_ACCEPTED) { + do_import(sfdb.get_filenames, sfdb.get_split(), as_tracks); + } } void @@ -2032,12 +2033,9 @@ Editor::embed_audio () return; } - SoundFileSelector& sfdb (ARDOUR_UI::instance()->get_sfdb_window()); - sigc::connection c = sfdb.Action.connect (mem_fun(*this, &Editor::do_embed_sndfiles)); - - sfdb.run (_("Add to External Region list"), true); + SoundFileSelector sfdb (_("Add to External Region list"), true, true); - c.disconnect (); + int result = sfdb.run (); } void -- cgit v1.2.3