Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filelist.c
| Show First 20 Lines • Show All 473 Lines • ▼ Show 20 Lines | void folderlist_pushdir(ListBase *folderlist, const char *dir) | ||||
| /* create next folder element */ | /* create next folder element */ | ||||
| folder = (FolderList *)MEM_mallocN(sizeof(FolderList), "FolderList"); | folder = (FolderList *)MEM_mallocN(sizeof(FolderList), "FolderList"); | ||||
| folder->foldername = BLI_strdup(dir); | folder->foldername = BLI_strdup(dir); | ||||
| /* add it to the end of the list */ | /* add it to the end of the list */ | ||||
| BLI_addtail(folderlist, folder); | BLI_addtail(folderlist, folder); | ||||
| } | } | ||||
| const char *folderlist_peeklastdir(ListBase *folderlist) | |||||
| { | |||||
| struct FolderList *folder; | |||||
| if (!folderlist->last) | |||||
| return NULL; | |||||
| folder = folderlist->last; | |||||
| return folder->foldername; | |||||
| } | |||||
| int folderlist_clear_next(struct SpaceFile *sfile) | int folderlist_clear_next(struct SpaceFile *sfile) | ||||
| { | { | ||||
| struct FolderList *folder; | struct FolderList *folder; | ||||
| /* if there is no folder_next there is nothing we can clear */ | /* if there is no folder_next there is nothing we can clear */ | ||||
| if (!sfile->folders_next) | if (!sfile->folders_next) | ||||
| return 0; | return 0; | ||||
| ▲ Show 20 Lines • Show All 927 Lines • Show Last 20 Lines | |||||