From f458df1c7b0f97cc1421cdbd40c950e8428ad0ec Mon Sep 17 00:00:00 2001 From: David Bailes Date: Mon, 18 May 2015 13:57:05 +0100 Subject: [PATCH] Changes to a number of dialogs so that the NVDA screen reader can read the titles. Missed these in my last patch. The accessibility name of the dialog is set to the title. --- src/AutoRecovery.cpp | 1 + src/BatchProcessDialog.cpp | 2 ++ src/Benchmark.cpp | 2 ++ src/Dependencies.cpp | 1 + src/FFmpeg.cpp | 1 + src/FFmpeg.h | 1 + src/LangChoice.cpp | 1 + src/SoundActivatedRecord.cpp | 1 + src/SplashDialog.cpp | 1 + src/Tags.cpp | 1 + src/TimeDialog.cpp | 1 + src/TrackPanel.cpp | 2 ++ src/effects/nyquist/Nyquist.cpp | 2 ++ src/export/Export.cpp | 2 ++ src/export/ExportCL.cpp | 3 +++ src/export/ExportFFmpeg.cpp | 1 + src/export/ExportFFmpegDialogs.cpp | 5 +++++ src/export/ExportFLAC.cpp | 1 + src/export/ExportMP2.cpp | 1 + src/export/ExportMP3.cpp | 4 ++++ src/export/ExportMultiple.cpp | 2 ++ src/export/ExportOGG.cpp | 1 + src/export/ExportPCM.cpp | 2 ++ src/import/Import.cpp | 2 ++ src/import/ImportRaw.cpp | 2 ++ src/toolbars/DeviceToolBar.cpp | 1 + src/widgets/ASlider.cpp | 1 + src/widgets/ErrorDialog.cpp | 2 ++ src/widgets/HelpSystem.cpp | 2 ++ src/widgets/Meter.cpp | 1 + src/widgets/MultiDialog.cpp | 2 ++ src/widgets/ProgressDialog.cpp | 2 ++ 32 files changed, 54 insertions(+) diff --git a/src/AutoRecovery.cpp b/src/AutoRecovery.cpp index 461f50022..83ba56ca4 100644 --- a/src/AutoRecovery.cpp +++ b/src/AutoRecovery.cpp @@ -57,6 +57,7 @@ AutoRecoveryDialog::AutoRecoveryDialog(wxWindow *parent) : wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE & (~wxCLOSE_BOX)) // no close box { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); PopulateOrExchange(S); } diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp index 8b52b9deb..46f8bf291 100644 --- a/src/BatchProcessDialog.cpp +++ b/src/BatchProcessDialog.cpp @@ -152,6 +152,7 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event)) wxString name = mChains->GetItemText(item); wxDialog d(this, wxID_ANY, GetTitle()); + d.SetName(d.GetTitle()); ShuttleGui S(&d, eIsCreating); S.StartHorizontalLay(wxCENTER, false); @@ -265,6 +266,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event)) files.Sort(); wxDialog d(this, wxID_ANY, GetTitle()); + d.SetName(d.GetTitle()); ShuttleGui S(&d, eIsCreating); S.StartVerticalLay(false); diff --git a/src/Benchmark.cpp b/src/Benchmark.cpp index da86bd4b7..be4c1c39b 100644 --- a/src/Benchmark.cpp +++ b/src/Benchmark.cpp @@ -129,6 +129,8 @@ BenchmarkDialog::BenchmarkDialog(wxWindow *parent): wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { + SetName(GetTitle()); + mBlockSizeStr = wxT("64"); mNumEditsStr = wxT("100"); mDataSizeStr = wxT("32"); diff --git a/src/Dependencies.cpp b/src/Dependencies.cpp index e412f41a7..8bff3a9cc 100644 --- a/src/Dependencies.cpp +++ b/src/Dependencies.cpp @@ -316,6 +316,7 @@ DependencyDialog::DependencyDialog(wxWindow *parent, mCopyAllFilesButton(NULL), mFutureActionChoice(NULL) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); PopulateOrExchange(S); } diff --git a/src/FFmpeg.cpp b/src/FFmpeg.cpp index 48f931681..aaaedf3d8 100644 --- a/src/FFmpeg.cpp +++ b/src/FFmpeg.cpp @@ -450,6 +450,7 @@ public: FindFFmpegDialog(wxWindow *parent, wxString path, wxString name, wxString type) : wxDialog(parent, wxID_ANY, wxString(_("Locate FFmpeg"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); mPath = path; diff --git a/src/FFmpeg.h b/src/FFmpeg.h index 60b92d8f9..79cd36261 100644 --- a/src/FFmpeg.h +++ b/src/FFmpeg.h @@ -177,6 +177,7 @@ public: FFmpegNotFoundDialog(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("FFmpeg not found"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); PopulateOrExchange(S); } diff --git a/src/LangChoice.cpp b/src/LangChoice.cpp index abf924e2e..67cce4a66 100644 --- a/src/LangChoice.cpp +++ b/src/LangChoice.cpp @@ -74,6 +74,7 @@ LangChoiceDialog::LangChoiceDialog(wxWindow * parent, const wxString & title): wxDialog(parent, id, title) { + SetName(GetTitle()); GetLanguages(mLangCodes, mLangNames); int ndx = mLangCodes.Index(GetSystemLanguageCode()); wxString lang; diff --git a/src/SoundActivatedRecord.cpp b/src/SoundActivatedRecord.cpp index fd73f9c05..671380b96 100644 --- a/src/SoundActivatedRecord.cpp +++ b/src/SoundActivatedRecord.cpp @@ -37,6 +37,7 @@ SoundActivatedRecord::SoundActivatedRecord(wxWindow* parent) wxDefaultSize, wxCAPTION ) // wxDefaultSize, wxCAPTION | wxTHICK_FRAME) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); PopulateOrExchange(S); Fit(); diff --git a/src/SplashDialog.cpp b/src/SplashDialog.cpp index b92290206..fc526a769 100644 --- a/src/SplashDialog.cpp +++ b/src/SplashDialog.cpp @@ -63,6 +63,7 @@ SplashDialog::SplashDialog(wxWindow * parent) wxPoint( -1, 60 ), // default x position, y position 60 pixels from top of screen. wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { + SetName(GetTitle()); this->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground )); m_pIcon = NULL; m_pLogo = NULL; //v diff --git a/src/Tags.cpp b/src/Tags.cpp index 297d3a33f..8e170de2f 100644 --- a/src/Tags.cpp +++ b/src/Tags.cpp @@ -969,6 +969,7 @@ void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event)) wxDialog dlg(this, wxID_ANY, _("Edit Genres"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); + dlg.SetName(dlg.GetTitle()); wxTextCtrl *tc; ShuttleGui S(&dlg, eIsCreating); diff --git a/src/TimeDialog.cpp b/src/TimeDialog.cpp index 9f2907af8..cd73acfb7 100644 --- a/src/TimeDialog.cpp +++ b/src/TimeDialog.cpp @@ -42,6 +42,7 @@ TimeDialog::TimeDialog(wxWindow *parent, mTime(time), mTimeCtrl(NULL) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); PopulateOrExchange(S); } diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 259c75fd2..565df6784 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -9101,6 +9101,7 @@ void TrackPanel::OnRateOther(wxCommandEvent &event) while (true) { wxDialog dlg(this, wxID_ANY, wxString(_("Set Rate"))); + dlg.SetName(dlg.GetTitle()); ShuttleGui S(&dlg, eIsCreating); wxString rate; wxArrayString rates; @@ -9429,6 +9430,7 @@ void TrackPanel::OnSetFont(wxCommandEvent & WXUNUSED(event)) /* i18n-hint: (noun) This is the font for the label track.*/ wxDialog dlg(this, wxID_ANY, wxString(_("Label Track Font"))); + dlg.SetName(dlg.GetTitle()); ShuttleGui S(&dlg, eIsCreating); wxListBox *lb; wxSpinCtrl *sc; diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 713a6a43f..9076e1c82 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -2046,6 +2046,8 @@ NyquistOutputDialog::NyquistOutputDialog(wxWindow * parent, wxWindowID id, wxString message) : wxDialog(parent, id, title) { + SetName(GetTitle()); + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *hSizer; wxButton *button; diff --git a/src/export/Export.cpp b/src/export/Export.cpp index a9dc173a0..40c063116 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -1110,6 +1110,8 @@ ExportMixerDialog::ExportMixerDialog( TrackList *tracks, bool selectedOnly, const wxPoint &position, const wxSize& size, long style ) : wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER ) { + SetName(GetTitle()); + int numTracks = 0; TrackListIterator iter( tracks ); diff --git a/src/export/ExportCL.cpp b/src/export/ExportCL.cpp index 1701e3aa3..f831784e0 100644 --- a/src/export/ExportCL.cpp +++ b/src/export/ExportCL.cpp @@ -65,6 +65,8 @@ ExportCLOptions::ExportCLOptions(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify Command Line Encoder"))) { + SetName(GetTitle()); + mHistory.Load(*gPrefs, wxT("/FileFormats/ExternalProgramHistory")); if (mHistory.GetCount() == 0) { @@ -503,6 +505,7 @@ int ExportCL::Export(AudacityProject *project, wxDefaultPosition, wxSize(600, 400), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); + dlg.SetName(dlg.GetTitle()); ShuttleGui S(&dlg, eIsCreating); S.AddTextWindow(cmd + wxT("\n\n") + output); diff --git a/src/export/ExportFFmpeg.cpp b/src/export/ExportFFmpeg.cpp index 414fc6c6f..eb8b586c7 100644 --- a/src/export/ExportFFmpeg.cpp +++ b/src/export/ExportFFmpeg.cpp @@ -904,6 +904,7 @@ void ExportFFmpeg::SetMetadata(Tags *tags, const char *name, const wxChar *tag) int ExportFFmpeg::AskResample(int bitrate, int rate, int lowrate, int highrate, const int *sampRates) { wxDialog d(NULL, wxID_ANY, wxString(_("Invalid sample rate"))); + d.SetName(d.GetTitle()); wxChoice *choice; ShuttleGui S(&d, eIsCreating); wxString text; diff --git a/src/export/ExportFFmpegDialogs.cpp b/src/export/ExportFFmpegDialogs.cpp index 463690506..aeb374f59 100644 --- a/src/export/ExportFFmpegDialogs.cpp +++ b/src/export/ExportFFmpegDialogs.cpp @@ -152,6 +152,7 @@ ExportFFmpegAC3Options::ExportFFmpegAC3Options(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify AC3 Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); for (unsigned int i=0; i < (sizeof(iAC3BitRates)/sizeof(int)); i++) @@ -216,6 +217,7 @@ ExportFFmpegAACOptions::ExportFFmpegAACOptions(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify AAC Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); PopulateOrExchange(S); @@ -275,6 +277,7 @@ ExportFFmpegAMRNBOptions::ExportFFmpegAMRNBOptions(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify AMR-NB Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); for (unsigned int i=0; i < (sizeof(iAMRNBBitRate)/sizeof(int)); i++) @@ -347,6 +350,7 @@ ExportFFmpegWMAOptions::ExportFFmpegWMAOptions(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify WMA Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); for (unsigned int i=0; i < (sizeof(iWMABitRate)/sizeof(int)); i++) @@ -1211,6 +1215,7 @@ ExportFFmpegOptions::ExportFFmpegOptions(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify Other Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); PickFFmpegLibs(); //FFmpegLibsInst->LoadLibs(NULL,true); //Loaded at startup or from Prefs now diff --git a/src/export/ExportFLAC.cpp b/src/export/ExportFLAC.cpp index 50d89535f..715ad5317 100644 --- a/src/export/ExportFLAC.cpp +++ b/src/export/ExportFLAC.cpp @@ -67,6 +67,7 @@ ExportFLACOptions::ExportFLACOptions(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify FLAC Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); PopulateOrExchange(S); diff --git a/src/export/ExportMP2.cpp b/src/export/ExportMP2.cpp index 92d25fefe..cfc6d9aa6 100644 --- a/src/export/ExportMP2.cpp +++ b/src/export/ExportMP2.cpp @@ -108,6 +108,7 @@ ExportMP2Options::ExportMP2Options(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify MP2 Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); for (unsigned int i=0; i < (sizeof(iBitrates)/sizeof(int)); i++) diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index 714d5f891..f93d1693a 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -309,6 +309,8 @@ ExportMP3Options::ExportMP3Options(wxWindow *parent) : wxDialog(parent, wxID_ANY, wxString(_("Specify MP3 Options"))) { + SetName(GetTitle()); + InitMP3_Statics(); mSetRate = gPrefs->Read(wxT("/FileFormats/MP3SetRate"), PRESET_STANDARD); @@ -563,6 +565,7 @@ public: /* i18n-hint: LAME is the name of an MP3 converter and should not be translated*/ wxString(_("Locate Lame"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); mPath = path; @@ -1878,6 +1881,7 @@ wxString ExportMP3::FindName(CHOICES *choices, int cnt, int needle) int ExportMP3::AskResample(int bitrate, int rate, int lowrate, int highrate) { wxDialog d(NULL, wxID_ANY, wxString(_("Invalid sample rate"))); + d.SetName(d.GetTitle()); wxChoice *choice; ShuttleGui S(&d, eIsCreating); wxString text; diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index 2cd4c0f0c..3302c9985 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -104,6 +104,8 @@ END_EVENT_TABLE() ExportMultiple::ExportMultiple(AudacityProject *project) : wxDialog(project, wxID_ANY, wxString(_("Export Multiple"))) { + SetName(GetTitle()); + mProject = project; mTracks = project->GetTracks(); mPlugins = mExporter.GetPlugins(); diff --git a/src/export/ExportOGG.cpp b/src/export/ExportOGG.cpp index 376059cdb..091ac85ca 100644 --- a/src/export/ExportOGG.cpp +++ b/src/export/ExportOGG.cpp @@ -64,6 +64,7 @@ ExportOGGOptions::ExportOGGOptions(wxWindow *parent, int WXUNUSED(format)) : wxDialog(parent, wxID_ANY, wxString(_("Specify Ogg Vorbis Options"))) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreatingFromPrefs); mOggQualityUnscaled = gPrefs->Read(wxT("/FileFormats/OggExportQuality"),50)/10; diff --git a/src/export/ExportPCM.cpp b/src/export/ExportPCM.cpp index 899aba39e..b3b7777e5 100644 --- a/src/export/ExportPCM.cpp +++ b/src/export/ExportPCM.cpp @@ -129,6 +129,8 @@ ExportPCMOptions::ExportPCMOptions(wxWindow * WXUNUSED(parent), int selformat) : wxDialog(NULL, wxID_ANY, wxString(_("Specify Uncompressed Options"))) { + SetName(GetTitle()); + mOk = NULL; int format = 0; diff --git a/src/import/Import.cpp b/src/import/Import.cpp index 9ab903b0e..eff3e380a 100644 --- a/src/import/Import.cpp +++ b/src/import/Import.cpp @@ -747,6 +747,8 @@ ImportStreamDialog::ImportStreamDialog( ImportFileHandle *_mFile, wxWindow *pare const wxPoint &position, const wxSize& size, long style ): wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER ) { + SetName(GetTitle()); + mFile = _mFile; scount = mFile->GetStreamCount(); for (wxInt32 i = 0; i < scount; i++) diff --git a/src/import/ImportRaw.cpp b/src/import/ImportRaw.cpp index 4e387531e..3c720e141 100644 --- a/src/import/ImportRaw.cpp +++ b/src/import/ImportRaw.cpp @@ -311,6 +311,8 @@ ImportRawDialog::ImportRawDialog(wxWindow * parent, mOffset(offset), mRate(rate) { + SetName(GetTitle()); + ShuttleGui S(this, eIsCreating); wxArrayString encodings; wxArrayString endians; diff --git a/src/toolbars/DeviceToolBar.cpp b/src/toolbars/DeviceToolBar.cpp index ee6bfc179..f7a48b35e 100644 --- a/src/toolbars/DeviceToolBar.cpp +++ b/src/toolbars/DeviceToolBar.cpp @@ -793,6 +793,7 @@ void DeviceToolBar::ShowComboDialog(wxChoice *combo, const wxString &title) wxArrayString inputSources = combo->GetStrings(); wxDialog dlg(NULL, wxID_ANY, title); + dlg.SetName(dlg.GetTitle()); ShuttleGui S(&dlg, eIsCreating); wxChoice *c; diff --git a/src/widgets/ASlider.cpp b/src/widgets/ASlider.cpp index fc72d64bb..4beed88b9 100644 --- a/src/widgets/ASlider.cpp +++ b/src/widgets/ASlider.cpp @@ -245,6 +245,7 @@ SliderDialog::SliderDialog(wxWindow * parent, wxWindowID id, wxDialog(parent,id,title,position), mStyle(style) { + SetName(GetTitle()); ShuttleGui S(this, eIsCreating); S.StartVerticalLay(); diff --git a/src/widgets/ErrorDialog.cpp b/src/widgets/ErrorDialog.cpp index dbce1fe59..6efa780e6 100644 --- a/src/widgets/ErrorDialog.cpp +++ b/src/widgets/ErrorDialog.cpp @@ -80,6 +80,8 @@ ErrorDialog::ErrorDialog( const bool Close, const bool modal): wxDialog(parent, (wxWindowID)-1, dlogTitle) { + SetName(GetTitle()); + long buttonMask; // only add the help button if we have a URL diff --git a/src/widgets/HelpSystem.cpp b/src/widgets/HelpSystem.cpp index 80c660291..989f3d22c 100644 --- a/src/widgets/HelpSystem.cpp +++ b/src/widgets/HelpSystem.cpp @@ -61,6 +61,7 @@ void HelpSystem::ShowInfoDialog( wxWindow *parent, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX /*| wxDEFAULT_FRAME_STYLE */); + dlog.SetName(dlog.GetTitle()); ShuttleGui S(&dlog, eIsCreating); S.StartVerticalLay(1); @@ -115,6 +116,7 @@ void HelpSystem::ShowHtmlText(wxWindow *pParent, #endif wxDEFAULT_FRAME_STYLE); + pWnd->SetName(pWnd->GetTitle()); ShuttleGui S( pWnd, eIsCreating ); S.SetStyle( wxNO_BORDER | wxTAB_TRAVERSAL ); diff --git a/src/widgets/Meter.cpp b/src/widgets/Meter.cpp index 7f89ec8c5..92d6b171c 100644 --- a/src/widgets/Meter.cpp +++ b/src/widgets/Meter.cpp @@ -1966,6 +1966,7 @@ void Meter::OnPreferences(wxCommandEvent & WXUNUSED(event)) // This determines where it pops up. wxDialog dlg(GetActiveProject(), wxID_ANY, title); + dlg.SetName(dlg.GetTitle()); ShuttleGui S(&dlg, eIsCreating); S.StartVerticalLay(); { diff --git a/src/widgets/MultiDialog.cpp b/src/widgets/MultiDialog.cpp index 2ea68305e..5f94113c7 100644 --- a/src/widgets/MultiDialog.cpp +++ b/src/widgets/MultiDialog.cpp @@ -66,6 +66,8 @@ MultiDialog::MultiDialog(wxWindow * pParent, wxDefaultPosition, wxDefaultSize, wxCAPTION) // not wxDEFAULT_DIALOG_STYLE because we don't want wxCLOSE_BOX and wxSYSTEM_MENU { + SetName(GetTitle()); + wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *vSizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *iconAndTextSizer = new wxBoxSizer( wxHORIZONTAL ); diff --git a/src/widgets/ProgressDialog.cpp b/src/widgets/ProgressDialog.cpp index e30f9e8c8..5695bfac7 100644 --- a/src/widgets/ProgressDialog.cpp +++ b/src/widgets/ProgressDialog.cpp @@ -1009,6 +1009,8 @@ ProgressDialog::ProgressDialog(const wxString & title, const wxString & message, mLastValue(0), mDisable(NULL) { + SetName(GetTitle()); + wxBoxSizer *v; wxWindow *w; wxSize ds;