diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-30 15:38:06 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-30 15:38:06 +0400 |
commit | 19fb497d139991ec759f3be3db53a27492c62877 (patch) | |
tree | 4a78caebf1832a1e755a031d7db86d61b1631322 /source/blender/editors/space_file | |
parent | ccdd490957f19ecc9e59bcf9a85ecc25788da99c (diff) |
Fix a few warning in editors/ module.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 30 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 2 |
4 files changed, 24 insertions, 30 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index f3179c05158..bfc17261fa6 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -542,10 +542,10 @@ void file_draw_list(const bContext *C, ARegion *ar) if (!(file->flags & EDITING)) { if (params->active_file == i) { - if (file->flags & ACTIVE) colorid= TH_HILITE; + if (file->flags & ACTIVEFILE) colorid= TH_HILITE; else colorid = TH_BACK; draw_tile(sx, sy-1, layout->tile_w+4, sfile->layout->tile_h+layout->tile_border_y, colorid,20); - } else if (file->flags & ACTIVE) { + } else if (file->flags & ACTIVEFILE) { colorid = TH_HILITE; draw_tile(sx, sy-1, layout->tile_w+4, sfile->layout->tile_h+layout->tile_border_y, colorid,0); } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 074e8b6c81b..f1d3702160f 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -59,7 +59,7 @@ #include <stdio.h> /* for events */ -#define NOTACTIVE 0 +#define NOTACTIVEFILE 0 #define ACTIVATE 1 #define INACTIVATE 2 @@ -86,8 +86,8 @@ static void file_deselect_all(SpaceFile* sfile) for ( i=0; i < numfiles; ++i) { struct direntry* file = filelist_file(sfile->files, i); - if (file && (file->flags & ACTIVE)) { - file->flags &= ~ACTIVE; + if (file && (file->flags & ACTIVEFILE)) { + file->flags &= ~ACTIVEFILE; } } } @@ -135,7 +135,7 @@ static FileSelect file_select(bContext* C, const rcti* rect, short selecting, sh int numfiles = filelist_numfiles(sfile->files); - params->selstate = NOTACTIVE; + params->selstate = NOTACTIVEFILE; first_file = find_file_mouse(sfile, ar, 1, rect->xmin, rect->ymax); last_file = find_file_mouse(sfile, ar, 1, rect->xmax, rect->ymin); @@ -147,15 +147,15 @@ static FileSelect file_select(bContext* C, const rcti* rect, short selecting, sh struct direntry* file = filelist_file(sfile->files, act_file); if (toggle_one) { - if (file->flags & ACTIVE) { - file->flags &= ~ACTIVE; + if (file->flags & ACTIVEFILE) { + file->flags &= ~ACTIVEFILE; selecting=0; } else - file->flags |= ACTIVE; + file->flags |= ACTIVEFILE; } else if (selecting) - file->flags |= ACTIVE; + file->flags |= ACTIVEFILE; else - file->flags &= ~ACTIVE; + file->flags &= ~ACTIVEFILE; } } @@ -296,8 +296,8 @@ static int file_select_all_exec(bContext *C, wmOperator *op) /* if any file is selected, deselect all first */ for ( i=0; i < numfiles; ++i) { struct direntry* file = filelist_file(sfile->files, i); - if (file && (file->flags & ACTIVE)) { - file->flags &= ~ACTIVE; + if (file && (file->flags & ACTIVEFILE)) { + file->flags &= ~ACTIVEFILE; select = 0; ED_area_tag_redraw(sa); } @@ -307,7 +307,7 @@ static int file_select_all_exec(bContext *C, wmOperator *op) for ( i=0; i < numfiles; ++i) { struct direntry* file = filelist_file(sfile->files, i); if(file && !S_ISDIR(file->type)) { - file->flags |= ACTIVE; + file->flags |= ACTIVEFILE; ED_area_tag_redraw(sa); } } @@ -543,7 +543,7 @@ int file_exec(bContext *C, wmOperator *exec_op) for (i=0; i<filelist_numfiles(sfile->files); i++) { file = filelist_file(sfile->files, i); - if(file->flags & ACTIVE) { + if(file->flags & ACTIVEFILE) { active=1; } } @@ -571,7 +571,7 @@ int file_exec(bContext *C, wmOperator *exec_op) if(RNA_struct_find_property(op->ptr, "files")) { for (i=0; i<numfiles; i++) { file = filelist_file(sfile->files, i); - if(file->flags & ACTIVE) { + if(file->flags & ACTIVEFILE) { if ((file->type & S_IFDIR)==0) { RNA_collection_add(op->ptr, "files", &itemptr); RNA_string_set(&itemptr, "name", file->relname); @@ -583,7 +583,7 @@ int file_exec(bContext *C, wmOperator *exec_op) if(RNA_struct_find_property(op->ptr, "dirs")) { for (i=0; i<numfiles; i++) { file = filelist_file(sfile->files, i); - if(file->flags & ACTIVE) { + if(file->flags & ACTIVEFILE) { if ((file->type & S_IFDIR)) { RNA_collection_add(op->ptr, "dirs", &itemptr); RNA_string_set(&itemptr, "name", file->relname); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 0cc58b281b9..dc818bb9172 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -90,15 +90,9 @@ #include "filelist.h" -/* Elubie: VERY, really very ugly and evil! Remove asap!!! */ -/* for state of file */ -#define ACTIVE 2 - /* max length of library group name within filesel */ #define GROUP_MAX 32 -static void *exec_loadimages(void *list_v); - struct FileList; typedef struct FileImage { @@ -977,15 +971,15 @@ void filelist_swapselect(struct FileList* filelist) file= filelist->filelist; for(num=0; num<filelist->numfiles; num++, file++) { - if(file->flags & ACTIVE) { + if(file->flags & ACTIVEFILE) { act= 1; break; } } file= filelist->filelist+2; for(num=2; num<filelist->numfiles; num++, file++) { - if(act) file->flags &= ~ACTIVE; - else file->flags |= ACTIVE; + if(act) file->flags &= ~ACTIVEFILE; + else file->flags |= ACTIVEFILE; } } @@ -1223,10 +1217,10 @@ void filelist_from_main(struct FileList *filelist) #if 0 // XXXXX TODO show the selection status of the objects if(!filelist->has_func) { /* F4 DATA BROWSE */ if(idcode==ID_OB) { - if( ((Object *)id)->flag & SELECT) files->flags |= ACTIVE; + if( ((Object *)id)->flag & SELECT) files->flags |= ACTIVEFILE; } else if(idcode==ID_SCE) { - if( ((Scene *)id)->r.scemode & R_BG_RENDER) files->flags |= ACTIVE; + if( ((Scene *)id)->r.scemode & R_BG_RENDER) files->flags |= ACTIVEFILE; } } #endif @@ -1367,4 +1361,4 @@ void thumbnails_start(struct FileList* filelist, const struct bContext* C) void thumbnails_stop(struct FileList* filelist, const struct bContext* C) { WM_jobs_kill(CTX_wm_manager(C), filelist); -}
\ No newline at end of file +} diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 5d1a765f457..7aed890e9ba 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -425,7 +425,7 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern) for (i = 0; i < n; i++) { file = filelist_file(sfile->files, i); if (fnmatch(pattern, file->relname, 0) == 0) { - file->flags |= ACTIVE; + file->flags |= ACTIVEFILE; match = 1; } } |