diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2013-11-02 21:58:53 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2013-11-02 21:58:53 +0400 |
commit | 348addd7d2dff6bb2d898a1db014332311fa0dcc (patch) | |
tree | d9b1dde966dacf1a582f6c3bbddb38cbcbcbe713 /source/blender/editors/space_file | |
parent | a8a4431fcfbe9504742bf465d137bcd977288222 (diff) |
OSX: give application bundles an own icon to better differentiate vs. folders
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 43df3be45ac..c4e6ca97418 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -251,6 +251,9 @@ static int get_file_icon(struct direntry *file) if (strcmp(file->relname, "..") == 0) { return ICON_FILE_PARENT; } + if (file->flags & APPLICATIONBUNDLE) { + return ICON_UGLYPACKAGE; + } if (file->flags & BLENDERFILE) { return ICON_FILE_BLEND; } diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 822d1ba8bca..6ee1afea5e9 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -772,6 +772,9 @@ static int path_extension_type(const char *path) else if (file_is_blend_backup(path)) { return BLENDERFILE_BACKUP; } + else if (BLI_testextensie(path, ".app")) { + return APPLICATIONBUNDLE; + } else if (BLI_testextensie(path, ".py")) { return PYSCRIPTFILE; } @@ -863,8 +866,8 @@ static void filelist_setfiletypes(struct FileList *filelist) for (num = 0; num < filelist->numfiles; num++, file++) { file->type = file->s.st_mode; /* restore the mess below */ - /* Don't check extensions for directories */ - if (file->type & S_IFDIR) { + /* Don't check extensions for directories, allow in OSX application bundles */ + if ((file->type & S_IFDIR) && (!APPLICATIONBUNDLE)) { continue; } file->flags = file_extension_type(filelist->dir, file->relname); |