13
0

tweak presentation of SMF tempo option

This commit is contained in:
Paul Davis 2016-12-16 14:14:08 +00:00
parent 7bf10eda75
commit 8436f392b6
2 changed files with 15 additions and 2 deletions

View File

@ -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
{

View File

@ -289,11 +289,12 @@ class SoundFileOmega : public SoundFileBrowser
InstrumentSelector instrument_combo;
Gtk::CheckButton copy_files_btn;
Gtk::Button smf_tempo_btn;
Gtk::CheckButton smf_tempo_btn;
void set_mode (Editing::ImportMode);
Editing::ImportMode get_mode() const;
ARDOUR::MidiTrackNameSource get_midi_track_name_source () const;
bool get_use_smf_tempo_map () const;
Editing::ImportPosition get_position() const;
Editing::ImportDisposition get_channel_disposition() const;
ARDOUR::SrcQuality get_src_quality() const;