Ticket #63344: glib-tiger-compat.diff
File glib-tiger-compat.diff, 1.3 KB (added by evanmiller (Evan Miller), 3 years ago) |
---|
-
glib/gosxutils.m
old new 33 33 NSArray *paths; 34 34 35 35 paths = NSSearchPathForDirectoriesInDomains (type, NSUserDomainMask, YES); 36 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 36 37 path = [paths firstObject]; 38 #else 39 path = [paths count] ? [paths objectAtIndex:0] : NULL; 40 #endif 37 41 if (path == nil) 38 42 { 39 43 return NULL; … … 49 53 { 50 54 table[G_USER_DIRECTORY_DESKTOP] = find_folder (NSDesktopDirectory); 51 55 table[G_USER_DIRECTORY_DOCUMENTS] = find_folder (NSDocumentDirectory); 56 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 52 57 table[G_USER_DIRECTORY_DOWNLOAD] = find_folder (NSDownloadsDirectory); 53 58 table[G_USER_DIRECTORY_MUSIC] = find_folder (NSMusicDirectory); 54 59 table[G_USER_DIRECTORY_PICTURES] = find_folder (NSPicturesDirectory); 55 60 table[G_USER_DIRECTORY_PUBLIC_SHARE] = find_folder (NSSharedPublicDirectory); 56 61 table[G_USER_DIRECTORY_TEMPLATES] = NULL; 57 62 table[G_USER_DIRECTORY_VIDEOS] = find_folder (NSMoviesDirectory); 58 } 59 No newline at end of file 63 #else 64 table[G_USER_DIRECTORY_DOWNLOAD] = NULL; 65 table[G_USER_DIRECTORY_MUSIC] = NULL; 66 table[G_USER_DIRECTORY_PICTURES] = NULL; 67 table[G_USER_DIRECTORY_PUBLIC_SHARE] = NULL; 68 table[G_USER_DIRECTORY_TEMPLATES] = NULL; 69 table[G_USER_DIRECTORY_VIDEOS] = NULL; 70 #endif 71 }