summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-19 21:40:06 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-19 21:40:06 +0000
commit46f594ac839e81d3e9eee821084f22290a0cc61f (patch)
tree7a41bc3dc9e8eec8ffe34ffdf2946c84d17f05f3 /gtk2_ardour
parent271c8c8f000c6599aaf17a1d96a3725a391d8926 (diff)
Make sure we always copy Freesound imported files as well as MIDI ones (#4675).
git-svn-id: svn://localhost/ardour2/branches/3.0@12789 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/sfdb_ui.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 3a0148469b..bff119d29d 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -582,6 +582,9 @@ SoundFileBrowser::SoundFileBrowser (Gtk::Window& parent, string title, ARDOUR::S
notebook.set_size_request (500, -1);
+ notebook.signal_switch_page().connect (
+ sigc::hide_return (sigc::hide (sigc::hide (sigc::mem_fun (*this, &SoundFileBrowser::reset_options))))
+ );
set_session (s);
@@ -1016,6 +1019,7 @@ SoundFileOmega::reset_options ()
channel_combo.set_sensitive (false);
action_combo.set_sensitive (false);
where_combo.set_sensitive (false);
+ copy_files_btn.set_active (true);
copy_files_btn.set_sensitive (false);
return false;
@@ -1201,17 +1205,26 @@ SoundFileOmega::reset_options ()
src_combo.set_sensitive (false);
}
+ /* We must copy MIDI files or those from Freesound */
+ bool const must_copy = have_a_midi_file || notebook.get_current_page() == 2;
+
if (Config->get_only_copy_imported_files()) {
- if (selection_can_be_embedded_with_links && !have_a_midi_file) {
+ if (selection_can_be_embedded_with_links && !must_copy) {
copy_files_btn.set_sensitive (true);
} else {
+ if (must_copy) {
+ copy_files_btn.set_active (true);
+ }
copy_files_btn.set_sensitive (false);
}
} else {
- copy_files_btn.set_sensitive (!have_a_midi_file);
+ if (must_copy) {
+ copy_files_btn.set_active (true);
+ }
+ copy_files_btn.set_sensitive (!must_copy);
}
return true;