#include "option_editor.h"
#include "location_ui.h"
#include "route_params_ui.h"
-#include "library_ui.h"
#include "i18n.h"
#include "editor.h"
#include "grouped_buttons.h"
#include "keyboard.h"
-#include "library_ui.h"
#include "marker.h"
#include "playlist_selector.h"
#include "regionview.h"
class TrackSelection;
class AutomationSelection;
class MixerStrip;
-class SoundFileSelector;
class StreamView;
class ControlPoint;
#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"
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
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
void
OptionEditor::click_browse_clicked ()
{
- SoundFileChooser sfdb (_("Choose Click"), false);
+ SoundFileChooser sfdb (_("Choose Click"), false, false);
int result = sfdb.run ();
void
OptionEditor::click_emphasis_browse_clicked ()
{
- SoundFileChooser sfdb (_("Click Emphasis"), false);
+ SoundFileChooser sfdb (_("Click Emphasis"), false, false);
int result = sfdb.run ();
#include "i18n.h"
-SoundFileChooser::SoundFileChooser (std::string title,
- bool split_makes_sense)
- :
- Gtk::FileChooserDialog(title)
-{
-
-}
-
-SoundFileChooser::~SoundFileChooser ()
-{
-
-}
#define __ardour_sfdb_ui_h__
#include <string>
+#include <vector>
-#include <gtkmm/filechooserdialog.h>
+#include <gtkmm/button.h>
+#include <gtkmm/dialog.h>
+#include <gtkmm/filechooserwidget.h>
-#include <ardour/audio_library.h>
+class SoundFileBrowser : public Gtk::Dialog
+{
+ public:
+ SoundFileBrowser (std::string title);
+ virtual ~SoundFileBrowser ();
+
+ protected:
+ Gtk::FileChooserWidget* chooser;
-class SoundFileChooser : public Gtk::FileChooserDialog
+ Gtk::Button* ok_btn;
+};
+
+class SoundFileChooser : public SoundFileBrowser
{
public:
- SoundFileChooser (std::string title, bool split_makes_sense);
+ SoundFileChooser (std::string title);
virtual ~SoundFileChooser ();
+
+ std::string get_filename ();
+
+ protected:
+ Gtk::Button* open_btn;
};
+class SoundFileOmega : public SoundFileChooser
+{
+ public:
+ SoundFileOmega (std::string title);
+ virtual ~SoundFileOmega ();
+
+ std::vector<std::string> get_filenames();
+ bool get_split();
+
+ protected:
+ Gtk::Button* insert_btn;
+ Gtk::Button* import_btn;
+}
+
#endif // __ardour_sfdb_ui_h__