aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2024-03-28 13:52:50 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2024-03-28 13:52:50 +1100
commita66cd4c4882781beb6855edf043b054874e48f91 (patch)
tree1ff3aa23d27359bbe0244ec3632784d63dd4104c
parent6e28c96eb4ac81fba49dde0d11872c90ef971484 (diff)
downloadscintilla-mirror-a66cd4c4882781beb6855edf043b054874e48f91.tar.gz
Avoid use of NSUserDefaults which will soon require justification when used in applications
on the App Store.
-rw-r--r--cocoa/PlatCocoa.mm9
-rw-r--r--doc/ScintillaHistory.html3
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<int>([[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<unsigned int>(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 @@
<a href="https://sourceforge.net/p/scintilla/bugs/2417/">Bug #2417</a>.
</li>
<li>
+ On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store.
+ </li>
+ <li>
Fix Win32 IME crash in windowed mode.
<a href="https://sourceforge.net/p/scintilla/bugs/2433/">Bug #2433</a>.
</li>