2014-08-10 23:17:21 -05:00
|
|
|
// 11 august 2014
|
|
|
|
|
|
|
|
#include "objc_darwin.h"
|
|
|
|
#include <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
void disableAutocorrect(id onwhat)
|
|
|
|
{
|
|
|
|
NSTextView *tv;
|
|
|
|
|
|
|
|
tv = (NSTextView *) onwhat;
|
|
|
|
[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];
|
2014-10-24 15:11:53 -05:00
|
|
|
[tv setAutomaticQuoteSubstitutionEnabled:NO];
|
|
|
|
[tv setAutomaticLinkDetectionEnabled:NO];
|
|
|
|
[tv setSmartInsertDeleteEnabled:NO];
|
2014-08-10 23:17:21 -05:00
|
|
|
}
|