1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-05 08:33:53 +01:00

Time Toolbar: Fixed ID for audio position

The Jaws screen reader script for audacity references the audio position control by its ID, so it's very helpful if this is fixed. It used to be fixed when the control was part of the Selection toolbar.
This commit is contained in:
David Bailes
2020-05-22 09:19:26 +01:00
parent 947ed37918
commit ad680e1bbc

View File

@@ -33,8 +33,15 @@
IMPLEMENT_CLASS(TimerToolBar, ToolBar);
// Having a fixed ID for the Audio Position is helpful for
// the Jaws screen reader script for Audacity.
enum {
TimeBarFirstID = 2800,
AudioPositionID
};
BEGIN_EVENT_TABLE(TimerToolBar, ToolBar)
EVT_COMMAND(wxID_ANY, EVT_TIMETEXTCTRL_UPDATED, TimerToolBar::OnUpdate)
EVT_COMMAND(AudioPositionID, EVT_TIMETEXTCTRL_UPDATED, TimerToolBar::OnUpdate)
EVT_SIZE(TimerToolBar::OnSize)
EVT_IDLE(TimerToolBar::OnIdle)
END_EVENT_TABLE()
@@ -71,7 +78,7 @@ void TimerToolBar::Populate()
auto format = NumericConverter::HoursMinsSecondsFormat();
// Create the read-only time control
mAudioTime = safenew NumericTextCtrl(this, wxID_ANY, NumericConverter::TIME, format, 0.0, rate);
mAudioTime = safenew NumericTextCtrl(this, AudioPositionID, NumericConverter::TIME, format, 0.0, rate);
mAudioTime->SetName(XO("Audio Position"));
mAudioTime->SetReadOnly(true);