diff options
author | Carl Hetherington <carl@carlh.net> | 2010-05-02 23:14:43 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-05-02 23:14:43 +0000 |
commit | c2da4ec8f988f6f8b9e426b03222a2c687c72edb (patch) | |
tree | 0223f8268e4462f0f1494c2795adb6367cee975a /gtk2_ardour/tempo_dialog.cc | |
parent | ceb1025c2c8ab1246a51c3967ee5a79773a4e008 (diff) |
Prevent multiple tempo / meter changes being inserted at the same point
on the timeline; adding a new change at the same time as an existing one
will replace the existing one. Should prevent #769 from happening.
Some cleanups and tweaks to tempo / meter dialogues. Desensitize Remove
menu option for those changes that can't be removed.
git-svn-id: svn://localhost/ardour2/branches/3.0@7045 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/tempo_dialog.cc')
-rw-r--r-- | gtk2_ardour/tempo_dialog.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc index 93cb5fcf01..71fd5b40b4 100644 --- a/gtk2_ardour/tempo_dialog.cc +++ b/gtk2_ardour/tempo_dialog.cc @@ -34,8 +34,8 @@ using namespace ARDOUR; using namespace PBD; TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action) - : ArdourDialog (_("edit tempo")), - bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0, 1.0), + : ArdourDialog (_("New Tempo")), + bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0), bpm_spinner (bpm_adjustment), ok_button (action), cancel_button (_("Cancel")), @@ -50,8 +50,8 @@ TempoDialog::TempoDialog (TempoMap& map, nframes_t frame, const string & action) } TempoDialog::TempoDialog (TempoSection& section, const string & action) - : ArdourDialog ("tempo dialog"), - bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0, 1.0), + : ArdourDialog ("Edit Tempo"), + bpm_adjustment (60.0, 1.0, 999.9, 0.1, 1.0), bpm_spinner (bpm_adjustment), ok_button (action), cancel_button (_("Cancel")), @@ -142,6 +142,7 @@ TempoDialog::init (const BBT_Time& when, double bpm, double note_type, bool mova bpm_spinner.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TempoDialog::response), RESPONSE_ACCEPT)); bpm_spinner.signal_button_press_event().connect (sigc::mem_fun (*this, &TempoDialog::bpm_button_press), false); bpm_spinner.signal_button_release_event().connect (sigc::mem_fun (*this, &TempoDialog::bpm_button_release), false); + bpm_spinner.signal_changed().connect (sigc::mem_fun (*this, &TempoDialog::bpm_changed)); when_bar_entry.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TempoDialog::response), RESPONSE_ACCEPT)); when_bar_entry.signal_key_release_event().connect (sigc::mem_fun (*this, &TempoDialog::entry_key_release), false); when_beat_entry.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TempoDialog::response), RESPONSE_ACCEPT)); @@ -149,6 +150,12 @@ TempoDialog::init (const BBT_Time& when, double bpm, double note_type, bool mova note_types.signal_changed().connect (sigc::mem_fun (*this, &TempoDialog::note_types_change)); } +void +TempoDialog::bpm_changed () +{ + set_response_sensitive (RESPONSE_ACCEPT, true); +} + bool TempoDialog::bpm_button_press (GdkEventButton*) { @@ -233,7 +240,7 @@ TempoDialog::note_types_change () MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action) - : ArdourDialog ("meter dialog"), + : ArdourDialog ("New Meter"), ok_button (action), cancel_button (_("Cancel")) { @@ -246,7 +253,7 @@ MeterDialog::MeterDialog (TempoMap& map, nframes_t frame, const string & action) } MeterDialog::MeterDialog (MeterSection& section, const string & action) - : ArdourDialog ("meter dialog"), + : ArdourDialog ("Edit Meter"), ok_button (action), cancel_button (_("Cancel")) { |