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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-04-01 04:34:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-01 08:22:28 +0400
commit617557b08ea94e2b65a1697ddf0b79651204d92b (patch)
tree50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/editors/space_file
parent2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff)
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_ops.c14
-rw-r--r--source/blender/editors/space_file/file_panels.c8
-rw-r--r--source/blender/editors/space_file/filelist.c12
-rw-r--r--source/blender/editors/space_file/filesel.c18
-rw-r--r--source/blender/editors/space_file/fsmenu.c2
-rw-r--r--source/blender/editors/space_file/space_file.c30
6 files changed, 42 insertions, 42 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 4a298e183e6..9c11fc712c8 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -171,7 +171,7 @@ static FileSelect file_select_do(bContext *C, int selected_idx, short do_diropen
params->active_file = selected_idx;
if (S_ISDIR(file->type)) {
- if (do_diropen == FALSE) {
+ if (do_diropen == false) {
params->file[0] = '\0';
retval = FILE_SELECT_DIR;
}
@@ -287,7 +287,7 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
BLI_rcti_isect(&(ar->v2d.mask), &rect, &rect);
- ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, FALSE, FALSE);
+ ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, false, false);
if (FILE_SELECT_DIR == ret) {
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL);
}
@@ -363,11 +363,11 @@ void FILE_OT_select(wmOperatorType *ot)
ot->poll = ED_operator_file_active;
/* properties */
- prop = RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
+ prop = RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "fill", FALSE, "Fill", "Select everything beginning with the last selection");
+ prop = RNA_def_boolean(ot->srna, "fill", false, "Fill", "Select everything beginning with the last selection");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "open", TRUE, "Open", "Open a directory when selecting it");
+ prop = RNA_def_boolean(ot->srna, "open", true, "Open", "Open a directory when selecting it");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
@@ -773,13 +773,13 @@ bool file_draw_check_exists(SpaceFile *sfile)
char filepath[FILE_MAX];
BLI_join_dirfile(filepath, sizeof(filepath), sfile->params->dir, sfile->params->file);
if (BLI_is_file(filepath)) {
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
/* sends events now, so things get handled on windowqueue level */
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 4b81b726dcf..cb07db75a91 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -86,12 +86,12 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
uiLayoutSetAlignment(pa->layout, UI_LAYOUT_ALIGN_LEFT);
block = uiLayoutGetBlock(pa->layout);
box = uiLayoutBox(pa->layout);
- col = uiLayoutColumn(box, TRUE);
+ col = uiLayoutColumn(box, true);
for (i = 0; i < nentries; ++i) {
char dir[FILE_MAX];
char temp[FILE_MAX];
- uiLayout *layout = uiLayoutRow(col, FALSE);
+ uiLayout *layout = uiLayoutRow(col, false);
char *entry;
entry = fsmenu_get_entry(fsmenu, category, i);
@@ -157,7 +157,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa)
uiLayout *row;
if (sfile) {
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
uiItemO(row, IFACE_("Add"), ICON_ZOOMIN, "file.bookmark_add");
uiItemL(row, NULL, ICON_NONE);
@@ -178,7 +178,7 @@ static void file_panel_recent(const bContext *C, Panel *pa)
if (sfile) {
if (!(U.uiflag & USER_HIDE_RECENT)) {
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent");
uiItemL(row, NULL, ICON_NONE);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index a7995dd8a90..15d177011c4 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -393,7 +393,7 @@ void filelist_init_icons(void)
ImBuf *bbuf;
ImBuf *ibuf;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
#ifdef WITH_HEADLESS
bbuf = NULL;
@@ -421,7 +421,7 @@ void filelist_free_icons(void)
{
int i;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
for (i = 0; i < SPECIAL_IMG_MAX; ++i) {
IMB_freeImBuf(gSpecialFileImages[i]);
@@ -624,7 +624,7 @@ ImBuf *filelist_getimage(struct FileList *filelist, int index)
ImBuf *ibuf = NULL;
int fidx = 0;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
@@ -641,7 +641,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index)
struct direntry *file = NULL;
int fidx = 0;
- BLI_assert(G.background == FALSE);
+ BLI_assert(G.background == false);
if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
@@ -1333,7 +1333,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float
limg->flags |= MOVIEFILE_ICON;
}
}
- *do_update = TRUE;
+ *do_update = true;
PIL_sleep_ms(10);
limg = limg->next;
}
@@ -1353,7 +1353,7 @@ static void thumbnails_update(void *tjv)
tj->filelist->filelist[limg->index].flags &= ~MOVIEFILE;
tj->filelist->filelist[limg->index].flags |= MOVIEFILE_ICON;
}
- limg->done = TRUE;
+ limg->done = true;
}
limg = limg->next;
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index e00d0f34dd9..19947a9ffc9 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -124,7 +124,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
else
params->type = FILE_SPECIAL;
- if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", FALSE)) {
+ if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) {
char name[FILE_MAX];
RNA_string_get(op->ptr, "filepath", name);
if (params->type == FILE_LOADLIB) {
@@ -136,12 +136,12 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
else {
- if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", FALSE)) {
+ if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", false)) {
RNA_string_get(op->ptr, "directory", params->dir);
sfile->params->file[0] = '\0';
}
- if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", FALSE)) {
+ if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", false)) {
RNA_string_get(op->ptr, "filename", params->file);
}
}
@@ -151,7 +151,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
BLI_path_abs(params->dir, G.main->name);
}
- if (is_directory == TRUE && is_filename == FALSE && is_filepath == FALSE && is_files == FALSE) {
+ if (is_directory == true && is_filename == false && is_filepath == false && is_files == false) {
params->flag |= FILE_DIRSEL_ONLY;
}
else {
@@ -228,7 +228,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
if (is_relative_path) {
- if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", FALSE)) {
+ if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", false)) {
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
}
}
@@ -267,7 +267,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* switching thumbnails needs to recalc layout [#28809] */
if (sfile->layout) {
- sfile->layout->dirty = TRUE;
+ sfile->layout->dirty = true;
}
return 1;
@@ -498,9 +498,9 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
if (sfile->layout == NULL) {
sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout");
- sfile->layout->dirty = TRUE;
+ sfile->layout->dirty = true;
}
- else if (sfile->layout->dirty == FALSE) {
+ else if (sfile->layout->dirty == false) {
return;
}
@@ -574,7 +574,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar)
layout->width = sfile->layout->columns * (layout->tile_w + 2 * layout->tile_border_x) + layout->tile_border_x * 2;
layout->flag = FILE_LAYOUT_HOR;
}
- layout->dirty = FALSE;
+ layout->dirty = false;
}
FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, ARegion *ar)
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 201abf6934a..f6bc6f70f36 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -542,7 +542,7 @@ void fsmenu_refresh_system_category(struct FSMenu *fsmenu)
fsmenu_set_category(fsmenu, FS_CATEGORY_SYSTEM_BOOKMARKS, NULL);
/* Add all entries to system category */
- fsmenu_read_system(fsmenu, TRUE);
+ fsmenu_read_system(fsmenu, true);
}
void fsmenu_free(void)
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 4c4b9fc79f0..c04f4a5627e 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -152,7 +152,7 @@ static void file_init(wmWindowManager *UNUSED(wm), ScrArea *sa)
/* refresh system directory list */
fsmenu_refresh_system_category(fsmenu_get());
- if (sfile->layout) sfile->layout->dirty = TRUE;
+ if (sfile->layout) sfile->layout->dirty = true;
}
static void file_exit(wmWindowManager *wm, ScrArea *sa)
@@ -250,7 +250,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa))
BLI_strncpy(sfile->params->renameedit, sfile->params->renamefile, sizeof(sfile->params->renameedit));
params->renamefile[0] = '\0';
}
- if (sfile->layout) sfile->layout->dirty = TRUE;
+ if (sfile->layout) sfile->layout->dirty = true;
}
@@ -417,26 +417,26 @@ static void file_keymap(struct wmKeyConfig *keyconf)
/* keys for main area */
keymap = WM_keymap_find(keyconf, "File Browser Main", SPACE_FILE, 0);
kmi = WM_keymap_add_item(keymap, "FILE_OT_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
- RNA_boolean_set(kmi->ptr, "need_active", TRUE);
+ RNA_boolean_set(kmi->ptr, "need_active", true);
/* left mouse selects and opens */
WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, 0, 0);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "fill", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "fill", true);
/* right mouse selects without opening */
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, 0, 0);
- RNA_boolean_set(kmi->ptr, "open", FALSE);
+ RNA_boolean_set(kmi->ptr, "open", false);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "open", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "open", false);
kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
- RNA_boolean_set(kmi->ptr, "fill", TRUE);
- RNA_boolean_set(kmi->ptr, "open", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
+ RNA_boolean_set(kmi->ptr, "fill", true);
+ RNA_boolean_set(kmi->ptr, "open", false);
/* front and back mouse folder navigation */
WM_keymap_add_item(keymap, "FILE_OT_previous", BUTTON4MOUSE, KM_CLICK, 0, 0);
@@ -639,7 +639,7 @@ void ED_file_init(void)
{
ED_file_read_bookmarks();
- if (G.background == FALSE) {
+ if (G.background == false) {
filelist_init_icons();
}
@@ -650,7 +650,7 @@ void ED_file_exit(void)
{
fsmenu_free();
- if (G.background == FALSE) {
+ if (G.background == false) {
filelist_free_icons();
}
}
@@ -661,7 +661,7 @@ void ED_file_read_bookmarks(void)
fsmenu_free();
- fsmenu_read_system(fsmenu_get(), TRUE);
+ fsmenu_read_system(fsmenu_get(), true);
if (cfgdir) {
char name[FILE_MAX];