Re-enable automatic substitutions in wxTextCtrl on OS X

This reverts ill-advised commits
c07523734f and
8d42890df4 that disabled native OS X
behavior of substituting dashes and quotes with typographically correct
characters if the user has this feature enabled.

This was a bad idea for two reasons:

1. It made wx applications behave non-natively, and thus be worse, in a
   highly noticeable area.

2. It made it impossible for applications that want to behave correctly
   to restore the native behavior, because once
   setAutomaticDashSubstitutionEnabled or
   setAutomaticQuoteSubstitutionEnabled is called (as wxTextCtrl
   constructor does), it's no longer possible to obtain its original,
   default setting.

It's not better to disable native functionality by default, it's better to
be native and make customizations possible. wxWindow API exposes access
to the native control and if an application desires to disable
substitution behavior, it can easily do so from user code.

See also #186 and #241.
This commit is contained in:
Václav Slavík 2016-10-03 18:15:53 +02:00
parent d8b2da0334
commit 3028fd40a0
2 changed files with 0 additions and 3 deletions

View File

@ -152,7 +152,6 @@ wxOSX:
- Implement wxGetDisplaySizeMM() and fix printing DPI (David Vanderson).
- Remove extra borders around wxFilePickerCtrl (John Roberts).
- Set up extensions filter correctly in wxFileDialog (nick863).
- Turn off automatic quotes substitutions in wxTextCtrl (Xlord2).
- Implement wxDataViewChoiceByIndexRenderer (wanup).
- Fix unnecessary indentation in list-like wxDataViewCtrl (Andreas Falkenhahn).
- Recognize macOS 10.12 Sierra in wxGetOsDescription() (Tobias Taschner).

View File

@ -620,8 +620,6 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w, long s
[tv setVerticallyResizable:YES];
[tv setHorizontallyResizable:hasHScroll];
[tv setAutoresizingMask:NSViewWidthSizable];
[tv setAutomaticDashSubstitutionEnabled:false];
[tv setAutomaticQuoteSubstitutionEnabled:false];
if ( hasHScroll )
{