From a66cd4c4882781beb6855edf043b054874e48f91 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Thu, 28 Mar 2024 13:52:50 +1100 Subject: Avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store. --- cocoa/PlatCocoa.mm | 9 +++------ doc/ScintillaHistory.html | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index d97c9f08d..6eb12f4ad 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -2298,8 +2298,7 @@ ColourRGBA Platform::ChromeHighlight() { * Returns the currently set system font for the user. */ const char *Platform::DefaultFont() { - NSString *name = [[NSUserDefaults standardUserDefaults] stringForKey: @"NSFixedPitchFont"]; - return name.UTF8String; + return "Menlo-Regular"; } //-------------------------------------------------------------------------------------------------- @@ -2308,8 +2307,7 @@ const char *Platform::DefaultFont() { * Returns the currently set system font size for the user. */ int Platform::DefaultFontSize() { - return static_cast([[NSUserDefaults standardUserDefaults] - integerForKey: @"NSFixedPitchFontSize"]); + return 11; } //-------------------------------------------------------------------------------------------------- @@ -2321,8 +2319,7 @@ int Platform::DefaultFontSize() { * @return time span in milliseconds */ unsigned int Platform::DoubleClickTime() { - float threshold = [[NSUserDefaults standardUserDefaults] floatForKey: - @"com.apple.mouse.doubleClickThreshold"]; + NSTimeInterval threshold = NSEvent.doubleClickInterval; if (threshold == 0) threshold = 0.5; return static_cast(threshold * 1000.0); diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 331a76420..5c711c199 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -597,6 +597,9 @@ Bug #2417.
  • + On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store. +
  • +
  • Fix Win32 IME crash in windowed mode. Bug #2433.
  • -- cgit v1.2.3