Skip to content

Commit 3325ea3

Browse files
committed
Add some newer osx paths
1 parent e43d4eb commit 3325ea3

2 files changed

Lines changed: 45 additions & 2 deletions

File tree

Headers/Foundation/NSPathUtilities.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,19 @@ enum
130130
NSDownloadsDirectory = 15, /** location of downloaded files */
131131
#endif
132132
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
133+
NSInputMethodsDirectory = 16, /** location of Library/Input methods */
133134
NSMoviesDirectory = 17, /** location of video/movie files */
134135
NSMusicDirectory = 18, /** location of music files */
135136
NSPicturesDirectory = 19, /** location of picture/images files */
137+
NSPrinterDescriptionDirectory = 20, /** location of system/PPDs */
138+
NSSharedPublicDirectory = 21, /** location of users public sharing */
139+
NSPreferencePanesDirectory = 22, /** location of preference panes */
140+
#if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST)
141+
NSApplicationScriptsDirectory = 23, /** location of user scripts */
142+
#endif
136143
NSItemReplacementDirectory = 99, /** pass to URLFirDirectory:inDomain:
137-
appropriateForURL:create:error to create a temporary directory */
144+
appropriateForURL:create:error to
145+
create a temporary directory */
138146
#endif
139147

140148
NSAllApplicationsDirectory = 100, /** all app directories */

Source/NSPathUtilities.m

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2477,6 +2477,12 @@ static void ShutdownPathUtilities(void)
24772477
}
24782478
break;
24792479

2480+
case NSInputMethodsDirectory:
2481+
{
2482+
ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Input");
2483+
}
2484+
break;
2485+
24802486
case NSMoviesDirectory:
24812487
{
24822488
/* Be consistent with NSDocumentDirectory */
@@ -2498,11 +2504,40 @@ static void ShutdownPathUtilities(void)
24982504
}
24992505
break;
25002506

2507+
case NSPrinterDescriptionDirectory:
2508+
{
2509+
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"PPDs");
2510+
}
2511+
break;
2512+
2513+
case NSSharedPublicDirectory:
2514+
{
2515+
ADD_PATH(NSUserDomainMask, gnustepUserHome, @"Public");
2516+
}
2517+
break;
2518+
2519+
case NSPreferencePanesDirectory:
2520+
{
2521+
NSString *p = @"PreferencePanes";
2522+
ADD_PATH(NSUserDomainMask, gnustepUserLibrary, p);
2523+
ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, p);
2524+
ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, p);
2525+
ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, p);
2526+
}
2527+
break;
2528+
2529+
case NSApplicationScriptsDirectory:
2530+
{
2531+
ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Scripts");
2532+
}
2533+
break;
2534+
25012535
case NSCachesDirectory:
25022536
{
25032537
#ifdef __ANDROID__
25042538
/* Use system-provided cache directory on Android */
2505-
ADD_PATH(NSUserDomainMask, [[NSProcessInfo processInfo] androidCacheDir], @"");
2539+
ADD_PATH(NSUserDomainMask,
2540+
[[NSProcessInfo processInfo] androidCacheDir], @"");
25062541
#else
25072542
/* Uff - at the moment the only place to put Caches seems to
25082543
* be Library. Unfortunately under GNU/Linux Library will

0 commit comments

Comments
 (0)