2015-04-07 15:12:28 -05:00
|
|
|
// 7 april 2015
|
|
|
|
#import "uipriv_darwin.h"
|
|
|
|
|
|
|
|
// also fine for NSCells and NSTexts (NSTextViews)
|
|
|
|
void setStandardControlFont(NSControl *control)
|
|
|
|
{
|
|
|
|
[control setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
|
|
|
|
}
|
2015-04-09 10:54:02 -05:00
|
|
|
|
2015-04-10 16:06:59 -05:00
|
|
|
void disableAutocorrect(NSTextView *tv)
|
2015-04-09 10:54:02 -05:00
|
|
|
{
|
2015-04-10 16:06:59 -05:00
|
|
|
[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];
|
2015-04-09 10:54:02 -05:00
|
|
|
}
|