13
0

Disallow import-without-copy for MIDI files (#4148).

git-svn-id: svn://localhost/ardour2/branches/3.0@12774 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-06-18 23:42:54 +00:00
parent d4a4dc20ab
commit 508b5fa341

View File

@ -1028,7 +1028,7 @@ SoundFileOmega::reset_options ()
/* if we get through this function successfully, this may be
reset at the end, once we know if we can use hard links
to do embedding
to do embedding (or if we are importing a MIDI file).
*/
if (Config->get_only_copy_imported_files()) {
@ -1044,6 +1044,13 @@ SoundFileOmega::reset_options ()
bool selection_can_be_embedded_with_links = check_link_status (_session, paths);
ImportMode mode;
/* See if we are thinking about importing any MIDI files */
vector<string>::iterator i = paths.begin ();
while (i != paths.end() && SMFSource::safe_midi_file_extension (*i) == false) {
++i;
}
bool const have_a_midi_file = (i != paths.end ());
if (check_info (paths, same_size, src_needed, selection_includes_multichannel)) {
Glib::signal_idle().connect (sigc::mem_fun (*this, &SoundFileOmega::bad_file_message));
return false;
@ -1196,7 +1203,7 @@ SoundFileOmega::reset_options ()
if (Config->get_only_copy_imported_files()) {
if (selection_can_be_embedded_with_links) {
if (selection_can_be_embedded_with_links && !have_a_midi_file) {
copy_files_btn.set_sensitive (true);
} else {
copy_files_btn.set_sensitive (false);
@ -1204,7 +1211,7 @@ SoundFileOmega::reset_options ()
} else {
copy_files_btn.set_sensitive (true);
copy_files_btn.set_sensitive (!have_a_midi_file);
}
return true;