@@ -97,8 +97,7 @@ void RestartWithCorrectGarbageCollectionSettingIfNecessary()
97
97
98
98
99
99
NSString *findPathToFileInLibraryWithinUserDomain (NSString *fileName)
100
- /* " Retuns the path to the first occurrence of fileName in a Library
101
- directory within the User domain. "*/
100
+ /* " Returns the path to the first occurrence of fileName in a Library directory within the User domain. "*/
102
101
{
103
102
NSString *result = nil ; // the returned path
104
103
NSString *candidate; // candidate paths
@@ -113,15 +112,14 @@ void RestartWithCorrectGarbageCollectionSettingIfNecessary()
113
112
result = [candidate stringByAppendingPathComponent: fileName];
114
113
if (![[NSFileManager defaultManager ] fileExistsAtPath: result])
115
114
{
116
- result = nil ;
115
+ result = nil ;
117
116
}
118
117
}
119
118
return result;
120
119
}
121
120
122
121
NSString *findPathToFileInLibraryWithinSystemDomain (NSString *fileName)
123
- /* " Retuns the path to the first occurrence of fileName in a Library
124
- directory within the System domain. "*/
122
+ /* " Returns the path to the first occurrence of fileName in a Library directory within the System domain. "*/
125
123
{
126
124
NSString *result = nil ; // the returned path
127
125
NSString *candidate; // candidate paths
@@ -136,7 +134,7 @@ void RestartWithCorrectGarbageCollectionSettingIfNecessary()
136
134
result = [candidate stringByAppendingPathComponent: fileName];
137
135
if (![[NSFileManager defaultManager ] fileExistsAtPath: result])
138
136
{
139
- result = nil ;
137
+ result = nil ;
140
138
}
141
139
}
142
140
return result;
@@ -201,6 +199,27 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
201
199
if ([[NSUserDefaults standardUserDefaults ] boolForKey: @" FScriptLoadSystemFrameworks" ])
202
200
[self loadSystemFrameworks ];
203
201
202
+ if (floor (NSAppKitVersionNumber ) > 949 )
203
+ {
204
+ // 10.6 or later system
205
+ NSString *systemFrameworksDirectoryPath;
206
+ NSString *path;
207
+
208
+ systemFrameworksDirectoryPath = findPathToFileInLibraryWithinSystemDomain (@" Frameworks" );
209
+ if (systemFrameworksDirectoryPath)
210
+ {
211
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" PreferencePanes.framework" ]; [[NSBundle bundleWithPath: path] load ];
212
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" ScreenSaver.framework" ]; [[NSBundle bundleWithPath: path] load ];
213
+
214
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" CoreLocation.framework" ]; [[NSBundle bundleWithPath: path] load ];
215
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" CoreWLAN.framework" ]; [[NSBundle bundleWithPath: path] load ];
216
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" ImageCaptureCore.framework" ]; [[NSBundle bundleWithPath: path] load ];
217
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" OpenDirectory.framework" ]; [[NSBundle bundleWithPath: path] load ];
218
+ path = [systemFrameworksDirectoryPath stringByAppendingPathComponent: @" ServerNotification.framework" ]; [[NSBundle bundleWithPath: path] load ];
219
+
220
+ }
221
+ }
222
+
204
223
if (!repositoryPath || ![fileManager fileExistsAtPath: repositoryPath isDirectory: &b])
205
224
{
206
225
NSString *applicationSupportDirectoryPath = findPathToFileInLibraryWithinUserDomain (@" Application Support" );
@@ -457,7 +476,7 @@ - (void)updatePreference:(id)sender // action
457
476
// NSLog(@"** updatePreference");
458
477
if (sender == fontSizeUI)
459
478
{
460
- [[NSUserDefaults standardUserDefaults ] setFloat : [fontSizeUI doubleValue ] forKey: @" FScriptFontSize" ];
479
+ [[NSUserDefaults standardUserDefaults ] setDouble : [fontSizeUI doubleValue ] forKey: @" FScriptFontSize" ];
461
480
[interpreterView setFontSize: [fontSizeUI doubleValue ]];
462
481
}
463
482
else if (sender == shouldJournalUI)
0 commit comments