@@ -97,8 +97,7 @@ void RestartWithCorrectGarbageCollectionSettingIfNecessary()
9797
9898
9999NSString *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. "*/
102101{
103102 NSString *result = nil ; // the returned path
104103 NSString *candidate; // candidate paths
@@ -113,15 +112,14 @@ void RestartWithCorrectGarbageCollectionSettingIfNecessary()
113112 result = [candidate stringByAppendingPathComponent: fileName];
114113 if (![[NSFileManager defaultManager ] fileExistsAtPath: result])
115114 {
116- result = nil ;
115+ result = nil ;
117116 }
118117 }
119118 return result;
120119}
121120
122121NSString *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. "*/
125123{
126124 NSString *result = nil ; // the returned path
127125 NSString *candidate; // candidate paths
@@ -136,7 +134,7 @@ void RestartWithCorrectGarbageCollectionSettingIfNecessary()
136134 result = [candidate stringByAppendingPathComponent: fileName];
137135 if (![[NSFileManager defaultManager ] fileExistsAtPath: result])
138136 {
139- result = nil ;
137+ result = nil ;
140138 }
141139 }
142140 return result;
@@ -201,6 +199,27 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
201199 if ([[NSUserDefaults standardUserDefaults ] boolForKey: @" FScriptLoadSystemFrameworks" ])
202200 [self loadSystemFrameworks ];
203201
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+
204223 if (!repositoryPath || ![fileManager fileExistsAtPath: repositoryPath isDirectory: &b])
205224 {
206225 NSString *applicationSupportDirectoryPath = findPathToFileInLibraryWithinUserDomain (@" Application Support" );
@@ -457,7 +476,7 @@ - (void)updatePreference:(id)sender // action
457476 // NSLog(@"** updatePreference");
458477 if (sender == fontSizeUI)
459478 {
460- [[NSUserDefaults standardUserDefaults ] setFloat : [fontSizeUI doubleValue ] forKey: @" FScriptFontSize" ];
479+ [[NSUserDefaults standardUserDefaults ] setDouble : [fontSizeUI doubleValue ] forKey: @" FScriptFontSize" ];
461480 [interpreterView setFontSize: [fontSizeUI doubleValue ]];
462481 }
463482 else if (sender == shouldJournalUI)
0 commit comments