From a2ad4dae36ea6c0b581f75d5ccdb257441f1429c Mon Sep 17 00:00:00 2001 From: "james.k.crook" Date: Sat, 13 Feb 2010 11:11:05 +0000 Subject: [PATCH] Use RICH2 edit ctrl in place of plain old text ctrl where possible. We can tab into it, and it is expected to be better for screen readers. --- src/Menus.cpp | 3 ++- src/effects/nyquist/Nyquist.cpp | 6 ++++++ src/export/ExportMultiple.cpp | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index fb22e1325..643fb318f 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -5432,7 +5432,8 @@ void AudacityProject::OnAudioDeviceInfo() S.StartHorizontalLay(wxEXPAND, true); { - S.SetStyle( wxTE_READONLY|wxHSCROLL|wxTE_MULTILINE ); + S.SetStyle( wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_RICH2 | + wxTE_AUTO_URL | wxTE_NOHIDESEL | wxHSCROLL ); tc = S.AddTextWindow(wxT("")); tc->WriteText(info); } diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index abc6a1365..c8ca23e7a 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -1278,6 +1278,12 @@ NyquistOutputDialog::NyquistOutputDialog(wxWindow * parent, wxWindowID id, item = new wxStaticText(this, -1, prompt); mainSizer->Add(item, 0, wxALIGN_LEFT | wxLEFT | wxTOP | wxRIGHT, 10); + // TODO: Convert this to using ShuttleGui. + // using S.AddTextWindow(); + // TODO: Consider using: + // wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_RICH2 | + // wxTE_AUTO_URL | wxTE_NOHIDESEL | wxHSCROLL + // Haven't made this change as this dialog MUST work with screen readers. item = new wxTextCtrl(this, -1, message, wxDefaultPosition, wxSize(400, 200), wxTE_MULTILINE | wxTE_READONLY); diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp index c248ad5cc..d33bbca19 100644 --- a/src/export/ExportMultiple.cpp +++ b/src/export/ExportMultiple.cpp @@ -548,7 +548,8 @@ void ExportMultiple::OnExport(wxCommandEvent& event) FileList += mExported[i]; FileList += '\n'; } - S.SetStyle( wxTE_READONLY|wxHSCROLL|wxTE_MULTILINE ); + S.SetStyle( wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_RICH2 | + wxTE_AUTO_URL | wxTE_NOHIDESEL | wxHSCROLL ); S.AddTextWindow( FileList ); S.AddStandardButtons(eOkButton); }