diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-10 17:06:59 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-10 17:06:59 -0400 |
| commit | 3069f38a9c0e91d13fe8a9274d1faa79107c87f4 (patch) | |
| tree | 82dcf26ab9cf0c4792ecef66e39ce88c0d03b620 /new/util_darwin.m | |
| parent | d326407f05cadec6422fe3ccbcfcaf41a869dfde (diff) | |
Removed autocorrect from Mac OS X uiEntries. Also moved uiFreeText() to text_darwin.m.
Diffstat (limited to 'new/util_darwin.m')
| -rw-r--r-- | new/util_darwin.m | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/new/util_darwin.m b/new/util_darwin.m index 8fbf391..906a0ea 100644 --- a/new/util_darwin.m +++ b/new/util_darwin.m @@ -7,7 +7,14 @@ void setStandardControlFont(NSControl *control) [control setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]]; } -void uiFreeText(char *s) +void disableAutocorrect(NSTextView *tv) { - free(s); + [tv setEnabledTextCheckingTypes:0]; + [tv setAutomaticDashSubstitutionEnabled:NO]; + // don't worry about automatic data detection; it won't change stringValue (thanks pretty_function in irc.freenode.net/#macdev) + [tv setAutomaticSpellingCorrectionEnabled:NO]; + [tv setAutomaticTextReplacementEnabled:NO]; + [tv setAutomaticQuoteSubstitutionEnabled:NO]; + [tv setAutomaticLinkDetectionEnabled:NO]; + [tv setSmartInsertDeleteEnabled:NO]; } |
