1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 08:29:27 +02:00

Bug2268: should be able to use " in Nyquist Prompt for Mac...

... We need to un-correct the smart quote characters back to dumb quotes
before passing the input to the Lisp interpreter.

The smart quote correction is a consequence of the move to the MacOS 10.9 SDK.
Stopping the correction at the source would require objective-C hacks in a
custom build of wxWidgets, and just not worth the effort.

This fix only corrects the text input at one wxTextCtrl.  Should we reexamine
other uses of that class?
This commit is contained in:
Paul Licameli 2019-12-28 14:49:07 -05:00
parent 460008f59d
commit 45a0ce1819

View File

@ -2466,6 +2466,13 @@ bool NyquistEffect::TransferDataToEffectWindow()
bool NyquistEffect::TransferDataFromPromptWindow()
{
mInputCmd = mCommandText->GetValue();
// Un-correct smart quoting, bothersomely applied in wxTextCtrl by
// the native widget of MacOS 10.9 SDK
const wxString left = wxT("\u201c"), right = wxT("\u201d"), dumb = '"';
mInputCmd.Replace(left, dumb, true);
mInputCmd.Replace(right, dumb, true);
mVersion = mVersionCheckBox->GetValue() ? 3 : 4;
return ParseCommand(mInputCmd);