summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-12-16 14:14:08 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2016-12-16 14:14:08 +0000
commit8436f392b64f5e711f97e10f4a1f33a77c65c4c7 (patch)
tree3242154e54d248a11a72e8c9dd8792e7efad91bb /gtk2_ardour/sfdb_ui.cc
parent7bf10eda75914efae36205cd87e17a93d74ff221 (diff)
tweak presentation of SMF tempo option
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 93ec1e7d28..e0d35174c4 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -1395,6 +1395,12 @@ SoundFileOmega::reset_options ()
return false;
}
+ if (have_a_midi_file) {
+ smf_tempo_btn.show ();
+ } else {
+ smf_tempo_btn.hide ();
+ }
+
string existing_choice;
vector<string> action_strings;
@@ -1726,6 +1732,7 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
Editing::ImportMode mode_hint)
: SoundFileBrowser (title, s, persistent)
, copy_files_btn ( _("Copy files to session"))
+ , smf_tempo_btn (_("Use MIDI Tempo Map (if defined)"))
, selected_audio_track_cnt (selected_audio_tracks)
, selected_midi_track_cnt (selected_midi_tracks)
, _import_active (false)
@@ -1773,7 +1780,6 @@ SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s,
options.attach (*l, 2, 3, 0, 1, FILL, SHRINK, 8, 0);
options.attach (midi_track_name_combo, 2, 3, 1, 2, FILL, SHRINK, 8, 0);
- smf_tempo_btn.set_label (_("Use MIDI Tempo Map (if defined)"));
options.attach (smf_tempo_btn, 2, 3, 3, 4, FILL, SHRINK, 8, 0);
l = manage (new Label);
@@ -1941,6 +1947,12 @@ SoundFileOmega::get_midi_track_name_source () const
return string2miditracknamesource (midi_track_name_combo.get_active_text());
}
+bool
+SoundFileOmega::get_use_smf_tempo_map () const
+{
+ return smf_tempo_btn.get_active ();
+}
+
ImportDisposition
SoundFileOmega::get_channel_disposition () const
{