diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-06 10:03:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-06 10:03:48 +0400 |
commit | a7507e945d1c314b9bf7f8298a8beea58e047d37 (patch) | |
tree | ae5ae0422e5eea00d1b2ae032ebcddaaf6058583 /source/blender/editors | |
parent | 5c7bed92d4a124a92c596f2dbe212cc59335925f (diff) |
fix [#26803] Libs paths are case sensitive in windows
use case insensitive path comparison on windows: BLI_path_cmp
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_buttons.c | 9 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_panels.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_file/fsmenu.c | 6 |
5 files changed, 11 insertions, 14 deletions
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 67b732ffa5e..79fcbb0e49d 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -73,8 +73,9 @@ /* make layer active one after being clicked on */ static void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl) { + /* make sure the layer we want to remove is the active one */ gpencil_layer_setactive(gpd, gpl); - + WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work! } @@ -88,13 +89,7 @@ static void gp_ui_dellayer_cb (bContext *C, void *gpd, void *gpl) WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work! } -static void gp_ui_actlayer_cb (bContext *C, void *gpd, void *gpl) -{ - /* make sure the layer we want to remove is the active one */ - gpencil_layer_setactive(gpd, gpl); - WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work! -} /* ------- Drawing Code ------- */ diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 37af293e3aa..9507a1a07f4 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -686,7 +686,7 @@ int UI_iconfile_get_index(const char *filename) ListBase *list=&(iconfilelist); for(ifile=list->first; ifile; ifile=ifile->next) { - if ( BLI_streq(filename, ifile->filename)) { + if (BLI_path_cmp(filename, ifile->filename) == 0) { return ifile->index; } } diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 2963f09ff96..959b1ddf1b5 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -101,7 +101,7 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat /* set this list item as active if we have a match */ if(sfile->params) { - if(strcmp(sfile->params->dir, entry) == 0) { + if(BLI_path_cmp(sfile->params->dir, entry) == 0) { *nr= i; } } diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index a32cfe29970..f0ffe34476f 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -459,7 +459,7 @@ int folderlist_clear_next(struct SpaceFile *sfile) // if previous_folder, next_folder or refresh_folder operators are executed it doesn't clear folder_next folder = sfile->folders_prev->last; - if ((!folder) ||(!strcmp(folder->foldername, sfile->params->dir))) + if ((!folder) ||(BLI_path_cmp(folder->foldername, sfile->params->dir) == 0)) return 0; // eventually clear flist->folders_next @@ -697,7 +697,7 @@ int filelist_find(struct FileList* filelist, char *file) for (i = 0; i < filelist->numfiles; ++i) { - if ( strcmp(filelist->filelist[i].relname, file) == 0) { + if ( strcmp(filelist->filelist[i].relname, file) == 0) { /* not dealing with user input so dont need BLI_path_cmp */ index = i; break; } @@ -880,7 +880,7 @@ static void filelist_read_library(struct FileList* filelist) strcat(name, file->relname); /* prevent current file being used as acceptable dir */ - if (BLI_streq(G.main->name, name)==0) { + if (BLI_path_cmp(G.main->name, name) != 0) { file->type &= ~S_IFMT; file->type |= S_IFDIR; } diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index ffe1677a6a9..a6e84b0c41d 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -173,9 +173,11 @@ void fsmenu_insert_entry(struct FSMenu* fsmenu, FSMenuCategory category, const c for (; fsme; prev= fsme, fsme= fsme->next) { if (fsme->path) { - if (BLI_streq(path, fsme->path)) { + const int cmp_ret= BLI_path_cmp(path, fsme->path); + if (cmp_ret == 0) { return; - } else if (sorted && strcmp(path, fsme->path)<0) { + } + else if (sorted && cmp_ret < 0) { break; } } else { |