Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 32b725e0b1f..7382188d62a 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -602,28 +602,6 @@ short filelist_changed(struct FileList* filelist)
return filelist->changed;
}
-static struct ImBuf * filelist_loadimage(struct FileList* filelist, int index)
-{
- ImBuf *imb = NULL;
- int fidx = 0;
-
- if ( (index < 0) || (index >= filelist->numfiltered) ) {
- return NULL;
- }
- fidx = filelist->fidx[index];
- imb = filelist->filelist[fidx].image;
- if (!imb)
- {
- if ( (filelist->filelist[fidx].flags & IMAGEFILE) || (filelist->filelist[fidx].flags & MOVIEFILE) ) {
- imb = IMB_thumb_read(filelist->filelist[fidx].path, THB_NORMAL);
- }
- if (imb) {
- filelist->filelist[fidx].image = imb;
- }
- }
- return imb;
-}
-
struct ImBuf * filelist_getimage(struct FileList* filelist, int index)
{
ImBuf* ibuf = NULL;
@@ -915,6 +893,8 @@ void filelist_select_file(struct FileList* filelist, int index, FileSelType sele
int check_ok = 0;
switch (check) {
case CHECK_DIRS:
+ check_ok = S_ISDIR(file->type);
+ break;
case CHECK_ALL:
check_ok = 1;
break;
@@ -1125,7 +1105,7 @@ void filelist_from_main(struct FileList *filelist)
if( filelist->dir[0]==0) {
/* make directories */
- filelist->numfiles= 23;
+ filelist->numfiles= 24;
filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
for(a=0; a<filelist->numfiles; a++) {
@@ -1155,6 +1135,7 @@ void filelist_from_main(struct FileList *filelist)
filelist->filelist[20].relname= BLI_strdup("Armature");
filelist->filelist[21].relname= BLI_strdup("Action");
filelist->filelist[22].relname= BLI_strdup("NodeTree");
+ filelist->filelist[23].relname= BLI_strdup("Speaker");
filelist_sort(filelist, FILE_SORT_ALPHA);
}
else {