diff options
author | Ton Roosendaal <ton@blender.org> | 2007-01-15 18:01:58 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-01-15 18:01:58 +0300 |
commit | 68c8a74746a7370690ba768aa228fb6e9b037a68 (patch) | |
tree | 9d4e6fcba7ab2476d0dfbba1440ae50a8c68d481 /source/blender/src/interface_icons.c | |
parent | 30f84055db249953f13c489ed23a1ba3be62c5e9 (diff) |
Removed annoying print for "icon directory not found". Was a missing check.
Probably, after release, we make this default in installs.
Also cleaned up code a bit.
Diffstat (limited to 'source/blender/src/interface_icons.c')
-rw-r--r-- | source/blender/src/interface_icons.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/src/interface_icons.c b/source/blender/src/interface_icons.c index a76a1bde2f7..872ec061d69 100644 --- a/source/blender/src/interface_icons.c +++ b/source/blender/src/interface_icons.c @@ -530,9 +530,9 @@ static void init_internal_icons() { bTheme *btheme= U.themes.first; ImBuf *bbuf; + int x, y; char iconfilestr[FILE_MAXDIR+FILE_MAXFILE]; char filenamestr[FILE_MAXFILE+16]; // 16 == strlen(".blender/icons/")+1 - int x, y; if ((btheme!=NULL) && (strlen(btheme->tui.iconfile) > 0)) { @@ -579,16 +579,15 @@ static void init_internal_icons() static void init_iconfile_list(struct ListBase *list) { - char icondirstr[FILE_MAXDIR]; - char iconfilestr[FILE_MAXDIR+FILE_MAXFILE]; - char olddir[FILE_MAXDIR+FILE_MAXFILE]; - int restoredir = 1; /* restore to current directory */ - IconFile *ifile; - ImBuf *bbuf; + ImBuf *bbuf= NULL; struct direntry *dir; + int restoredir = 1; /* restore to current directory */ int totfile, i, index=1; int ifilex, ifiley; + char icondirstr[FILE_MAXDIR]; + char iconfilestr[FILE_MAXDIR+FILE_MAXFILE]; + char olddir[FILE_MAXDIR+FILE_MAXFILE]; list->first = list->last = NULL; @@ -597,6 +596,10 @@ static void init_iconfile_list(struct ListBase *list) #else BLI_make_file_string("/", icondirstr, BLI_gethome(), ".blender/icons"); #endif + + if(BLI_exists(icondirstr)==0) + return; + /* since BLI_getdir changes the current working directory, restore it back to old value afterwards */ if(!BLI_getwdN(olddir)) |