Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/fsmenu.c
| Show First 20 Lines • Show All 763 Lines • ▼ Show 20 Lines | #elif defined(__APPLE__) | ||||
| fsmenu_insert_entry(fsmenu, | fsmenu_insert_entry(fsmenu, | ||||
| FS_CATEGORY_OTHER, | FS_CATEGORY_OTHER, | ||||
| "/Applications/", | "/Applications/", | ||||
| N_("Applications"), | N_("Applications"), | ||||
| ICON_FILE_FOLDER, | ICON_FILE_FOLDER, | ||||
| FS_INSERT_LAST); | FS_INSERT_LAST); | ||||
| const char *home = BLI_getenv("HOME"); | const char *home = BLI_getenv("HOME"); | ||||
| if (home) { | |||||
| # define FS_MACOS_PATH(path, name, icon) \ | # define FS_MACOS_PATH(path, name, icon) \ | ||||
| BLI_snprintf(line, sizeof(line), path, home); \ | BLI_snprintf(line, sizeof(line), path, home); \ | ||||
| fsmenu_insert_entry(fsmenu, FS_CATEGORY_OTHER, line, name, icon, FS_INSERT_LAST); | fsmenu_insert_entry(fsmenu, FS_CATEGORY_OTHER, line, name, icon, FS_INSERT_LAST); | ||||
| FS_MACOS_PATH("%s/", NULL, ICON_HOME) | FS_MACOS_PATH("%s/", NULL, ICON_HOME) | ||||
| FS_MACOS_PATH("%s/Desktop/", N_("Desktop"), ICON_DESKTOP) | FS_MACOS_PATH("%s/Desktop/", N_("Desktop"), ICON_DESKTOP) | ||||
| FS_MACOS_PATH("%s/Documents/", N_("Documents"), ICON_DOCUMENTS) | FS_MACOS_PATH("%s/Documents/", N_("Documents"), ICON_DOCUMENTS) | ||||
| FS_MACOS_PATH("%s/Downloads/", N_("Downloads"), ICON_IMPORT) | FS_MACOS_PATH("%s/Downloads/", N_("Downloads"), ICON_IMPORT) | ||||
| FS_MACOS_PATH("%s/Movies/", N_("Movies"), ICON_FILE_MOVIE) | FS_MACOS_PATH("%s/Movies/", N_("Movies"), ICON_FILE_MOVIE) | ||||
| FS_MACOS_PATH("%s/Music/", N_("Music"), ICON_FILE_SOUND) | FS_MACOS_PATH("%s/Music/", N_("Music"), ICON_FILE_SOUND) | ||||
| FS_MACOS_PATH("%s/Pictures/", N_("Pictures"), ICON_FILE_IMAGE) | FS_MACOS_PATH("%s/Pictures/", N_("Pictures"), ICON_FILE_IMAGE) | ||||
| FS_MACOS_PATH("%s/Library/Fonts/", N_("Fonts"), ICON_FILE_FONT) | FS_MACOS_PATH("%s/Library/Fonts/", N_("Fonts"), ICON_FILE_FONT) | ||||
| # undef FS_MACOS_PATH | # undef FS_MACOS_PATH | ||||
| } | |||||
| /* Get mounted volumes better method OSX 10.6 and higher, see: | /* Get mounted volumes better method OSX 10.6 and higher, see: | ||||
| * https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html | * https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html | ||||
| */ | */ | ||||
| /* We get all volumes sorted including network and do not relay | /* We get all volumes sorted including network and do not relay | ||||
| * on user-defined finder visibility, less confusing. */ | * on user-defined finder visibility, less confusing. */ | ||||
| ▲ Show 20 Lines • Show All 428 Lines • Show Last 20 Lines | |||||