reorder tempo dialog contents, provide non-presented var to control focus behavior
This commit is contained in:
parent
bb97ade440
commit
05c29e25f9
@ -243,7 +243,7 @@ TempoDialog::init (const Temporal::BBT_Time& when, double bpm, double end_bpm, d
|
|||||||
get_vbox ()->set_border_width (12);
|
get_vbox ()->set_border_width (12);
|
||||||
get_vbox ()->set_spacing (6);
|
get_vbox ()->set_spacing (6);
|
||||||
|
|
||||||
get_vbox ()->pack_end (*table, false, false);
|
get_vbox ()->pack_start (*table, false, false);
|
||||||
table->show_all ();
|
table->show_all ();
|
||||||
|
|
||||||
table = manage (new Table (2, 2));
|
table = manage (new Table (2, 2));
|
||||||
@ -298,13 +298,6 @@ TempoDialog::init (const Temporal::BBT_Time& when, double bpm, double end_bpm, d
|
|||||||
/* init state */
|
/* init state */
|
||||||
tempo_type_change ();
|
tempo_type_change ();
|
||||||
tapped = false;
|
tapped = false;
|
||||||
#if 0
|
|
||||||
bpm_spinner.select_region (0, -1);
|
|
||||||
bpm_spinner.grab_focus ();
|
|
||||||
#else
|
|
||||||
tap_tempo_button.set_can_focus ();
|
|
||||||
tap_tempo_button.grab_focus ();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TempoDialog::~TempoDialog ()
|
TempoDialog::~TempoDialog ()
|
||||||
@ -313,6 +306,20 @@ TempoDialog::~TempoDialog ()
|
|||||||
AudioEngine::instance ()->unregister_port (_midi_tap_port);
|
AudioEngine::instance ()->unregister_port (_midi_tap_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TempoDialog::on_show ()
|
||||||
|
{
|
||||||
|
ArdourDialog::on_show ();
|
||||||
|
|
||||||
|
if (!UIConfiguration::instance().get_prefer_tap_tempo()) {
|
||||||
|
bpm_spinner.select_region (0, -1);
|
||||||
|
bpm_spinner.grab_focus ();
|
||||||
|
} else {
|
||||||
|
tap_tempo_button.set_can_focus ();
|
||||||
|
tap_tempo_button.grab_focus ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TempoDialog::midi_event (MIDI::byte* msg, size_t len, MIDI::samplecnt_t now)
|
TempoDialog::midi_event (MIDI::byte* msg, size_t len, MIDI::samplecnt_t now)
|
||||||
{
|
{
|
||||||
@ -398,7 +405,7 @@ TempoDialog::port_changed ()
|
|||||||
}
|
}
|
||||||
tap_tempo_button.set_sensitive (!rv);
|
tap_tempo_button.set_sensitive (!rv);
|
||||||
bpm_spinner.set_sensitive (!rv);
|
bpm_spinner.set_sensitive (!rv);
|
||||||
if (!rv) {
|
if (!rv && UIConfiguration::instance().get_prefer_tap_tempo()) {
|
||||||
tap_tempo_button.grab_focus ();
|
tap_tempo_button.grab_focus ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,8 @@ public:
|
|||||||
Temporal::Tempo::Type get_tempo_type ();
|
Temporal::Tempo::Type get_tempo_type ();
|
||||||
Temporal::TimeDomain get_lock_style ();
|
Temporal::TimeDomain get_lock_style ();
|
||||||
|
|
||||||
|
void on_show ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init (const Temporal::BBT_Time& start, double bpm, double end_bpm, double note_type, Temporal::TempoPoint::Type type, bool movable, Temporal::TimeDomain style);
|
void init (const Temporal::BBT_Time& start, double bpm, double end_bpm, double note_type, Temporal::TempoPoint::Type type, bool movable, Temporal::TimeDomain style);
|
||||||
bool is_user_input_valid() const;
|
bool is_user_input_valid() const;
|
||||||
|
@ -153,6 +153,7 @@ UI_CONFIG_VARIABLE (bool, ask_before_closing_last_window, "ask-before-closing-la
|
|||||||
UI_CONFIG_VARIABLE (bool, ask_cut_copy_section_tempo_map, "ask-cut-copy-section-tempo-map", true)
|
UI_CONFIG_VARIABLE (bool, ask_cut_copy_section_tempo_map, "ask-cut-copy-section-tempo-map", true)
|
||||||
UI_CONFIG_VARIABLE (std::string, freesound_dir, "freesound-dir", "")
|
UI_CONFIG_VARIABLE (std::string, freesound_dir, "freesound-dir", "")
|
||||||
UI_CONFIG_VARIABLE (int, max_note_height, "max-note-height", 20)
|
UI_CONFIG_VARIABLE (int, max_note_height, "max-note-height", 20)
|
||||||
|
UI_CONFIG_VARIABLE (bool, prefer_tap_tempo, "prefer-tap-tempo", false)
|
||||||
#ifdef MIXBUS
|
#ifdef MIXBUS
|
||||||
UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, tempo_edit_behavior, "tempo-edit-behavior", Editing::TempoMapping)
|
UI_CONFIG_VARIABLE (Editing::TempoEditBehavior, tempo_edit_behavior, "tempo-edit-behavior", Editing::TempoMapping)
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user