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
path: root/source
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2013-11-02 21:58:53 +0400
committerJens Verwiebe <info@jensverwiebe.de>2013-11-02 21:58:53 +0400
commit348addd7d2dff6bb2d898a1db014332311fa0dcc (patch)
treed9b1dde966dacf1a582f6c3bbddb38cbcbcbe713 /source
parenta8a4431fcfbe9504742bf465d137bcd977288222 (diff)
OSX: give application bundles an own icon to better differentiate vs. folders
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_file/file_draw.c3
-rw-r--r--source/blender/editors/space_file/filelist.c7
-rw-r--r--source/blender/makesdna/DNA_space_types.h1
3 files changed, 9 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);
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index faa99aaaad8..4ebfe349a9f 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -693,6 +693,7 @@ typedef enum eFileSel_File_Types {
BTXFILE = (1 << 12),
COLLADAFILE = (1 << 13),
OPERATORFILE = (1 << 14), /* from filter_glob operator property */
+ APPLICATIONBUNDLE = (1 << 15),
} eFileSel_File_Types;
/* Selection Flags in filesel: struct direntry, unsigned char selflag */