diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-03-15 23:28:13 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-03-15 23:28:13 +0300 |
commit | 8fdb4d45063f01be975cf3c6351607115a0b8d4e (patch) | |
tree | d23e627f659b2718de89f442c167b37e838a26d6 /source/blender/editors/space_file/filelist.c | |
parent | ae6ee27d37f94a5c26cdf6060d71c5b6bc209a0e (diff) |
Fix [#21618] Wrong Icon For BLEND file on File/Append
While the folder icon was originally planned when in append/link mode, it's easier to distinguish with a blender icon, so the folder icon is now replaced.
Also fixed issue introduced in rev. 27491 where filter settings were incorrectly set when moving out of .blend file again.
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index b90bb47e6ce..c11260d7179 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -627,13 +627,13 @@ struct ImBuf * filelist_geticon(struct FileList* filelist, int index) fidx = filelist->fidx[index]; file = &filelist->filelist[fidx]; if (file->type & S_IFDIR) { - if ( strcmp(filelist->filelist[fidx].relname, "..") == 0) { - ibuf = gSpecialFileImages[SPECIAL_IMG_PARENT]; - } else if ( strcmp(filelist->filelist[fidx].relname, ".") == 0) { - ibuf = gSpecialFileImages[SPECIAL_IMG_REFRESH]; - } else { - ibuf = gSpecialFileImages[SPECIAL_IMG_FOLDER]; - } + if ( strcmp(filelist->filelist[fidx].relname, "..") == 0) { + ibuf = gSpecialFileImages[SPECIAL_IMG_PARENT]; + } else if ( strcmp(filelist->filelist[fidx].relname, ".") == 0) { + ibuf = gSpecialFileImages[SPECIAL_IMG_REFRESH]; + } else { + ibuf = gSpecialFileImages[SPECIAL_IMG_FOLDER]; + } } else { ibuf = gSpecialFileImages[SPECIAL_IMG_UNKNOWNFILE]; } @@ -788,8 +788,12 @@ void filelist_setfiletypes(struct FileList* filelist, short has_quicktime) file->type= file->s.st_mode; /* restore the mess below */ /* Don't check extensions for directories */ - if (file->type & S_IFDIR) + if (file->type & S_IFDIR) { + if(BLO_has_bfile_extension(file->relname)) { + file->flags |= BLENDERFILE; + } continue; + } if(BLO_has_bfile_extension(file->relname)) { file->flags |= BLENDERFILE; |