summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2005-10-12 21:59:45 +0000
committerTaybin Rutkin <taybin@taybin.com>2005-10-12 21:59:45 +0000
commit3b91a592be371e25c6c135664ba0af2f484431ab (patch)
tree51d97a89212d52b019a079827520d34078e942da /gtk2_ardour/editor_ops.cc
parentabb086738cdd0f862b1600e0780bbbf0f0967713 (diff)
split sfdb_v3 into 3 classes.
git-svn-id: svn://localhost/trunk/ardour2@59 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc22
1 files changed, 10 insertions, 12 deletions
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