region list patch #2 from chris g, slightly reworked by me; sv_se po changes, possibl...
[ardour.git] / gtk2_ardour / editor_audio_import.cc
index 06edb9fd8ebe825366dc6334667903c1858c33a9..a12eb0857f08ee472fd12391cf20d90f13fabf0d 100644 (file)
@@ -55,6 +55,7 @@
 #include "editing.h"
 #include "audio_time_axis.h"
 #include "midi_time_axis.h"
+#include "session_import_dialog.h"
 #include "utils.h"
 
 #include "i18n.h"
@@ -74,7 +75,7 @@ void
 Editor::add_external_audio_action (ImportMode mode_hint)
 {
        if (session == 0) {
-               MessageDialog msg (0, _("You can't import or embed a file until you have a session loaded."));
+               MessageDialog msg (_("You can't import or embed an audiofile until you have a session loaded."));
                msg.run ();
                return;
        }
@@ -95,7 +96,7 @@ Editor::external_audio_dialog ()
        uint32_t track_cnt;
 
        if (session == 0) {
-               MessageDialog msg (0, _("You can't import or embed a file until you have a session loaded."));
+               MessageDialog msg (_("You can't import or embed an audiofile until you have a session loaded."));
                msg.run ();
                return;
        }
@@ -184,6 +185,14 @@ Editor::external_audio_dialog ()
        } while (keepRunning);
 }
 
+void
+Editor::session_import_dialog ()
+{
+       SessionImportDialog dialog (*session);
+       ensure_float (dialog);
+       dialog.run ();
+}
+
 typedef std::map<PBD::ID,boost::shared_ptr<ARDOUR::Source> > SourceMap;
 
 /**
@@ -228,7 +237,7 @@ Editor::check_whether_and_how_to_import(string path, bool all_or_nothing)
                        message = string_compose(_("A source file %1 already exists. This operation will not update that source but import the file %2 as a new source, please confirm."), wave_name, wave_name);
 
                }
-               MessageDialog dialog(message, false,Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE, true);
+               MessageDialog dialog(message, false, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE, true);
 
                if (all_or_nothing) {
                        // disabled
@@ -781,9 +790,6 @@ Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64
                        
                        region_name = region_name_from_path ((*x)->path(), false, false, sources.size(), n);
 
-                       cout << "REGION NAME: " << region_name << endl;
-                       cout << "SOURCE LENGTH: " << (*x)->length() << endl;
-
                        regions.push_back (RegionFactory::create (just_one, 0, (*x)->length(), region_name, 0,
                                                                   Region::Flag (Region::DefaultFlags|Region::WholeFile|Region::External)));