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:
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_file/filelist.c16
-rw-r--r--source/blender/editors/space_file/filesel.c14
4 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index e31d813fc5e..5c6678967b5 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -461,7 +461,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
int offset;
int textwidth, textheight;
int i;
- short is_icon;
+ bool is_icon;
short align;
bool do_drag;
int column_space = 0.6f * UI_UNIT_X;
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 6f026a4adcd..3d5ae8c26cf 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -378,7 +378,7 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
FileSelection sel;
int numfiles = filelist_numfiles(sfile->files);
int i;
- int is_selected = 0;
+ bool is_selected = false;
sel.first = 0;
sel.last = numfiles - 1;
@@ -386,7 +386,7 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
/* Is any file selected ? */
for (i = 0; i < numfiles; ++i) {
if (filelist_is_selected(sfile->files, i, CHECK_ALL)) {
- is_selected = 1;
+ is_selected = true;
break;
}
}
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 748a0bd884c..7282b024399 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -120,7 +120,7 @@ typedef struct FileList {
short hide_parent;
void (*readf)(struct FileList *);
- int (*filterf)(struct direntry *file, const char *dir, unsigned int filter, short hide_dot);
+ bool (*filterf)(struct direntry *file, const char *dir, unsigned int filter, short hide_dot);
} FileList;
@@ -296,9 +296,9 @@ static int compare_extension(const void *a1, const void *a2)
return (BLI_strcasecmp(sufix1, sufix2));
}
-static int is_hidden_file(const char *filename, short hide_dot)
+static bool is_hidden_file(const char *filename, short hide_dot)
{
- int is_hidden = 0;
+ bool is_hidden = false;
if (hide_dot) {
if (filename[0] == '.' && filename[1] != '.' && filename[1] != 0) {
@@ -322,9 +322,9 @@ static int is_hidden_file(const char *filename, short hide_dot)
return is_hidden;
}
-static int is_filtered_file(struct direntry *file, const char *UNUSED(dir), unsigned int filter, short hide_dot)
+static bool is_filtered_file(struct direntry *file, const char *UNUSED(dir), unsigned int filter, short hide_dot)
{
- int is_filtered = 0;
+ bool is_filtered = false;
if (filter) {
if (file->flags & filter) {
is_filtered = 1;
@@ -341,9 +341,9 @@ static int is_filtered_file(struct direntry *file, const char *UNUSED(dir), unsi
return is_filtered && !is_hidden_file(file->relname, hide_dot);
}
-static int is_filtered_lib(struct direntry *file, const char *dir, unsigned int filter, short hide_dot)
+static bool is_filtered_lib(struct direntry *file, const char *dir, unsigned int filter, short hide_dot)
{
- int is_filtered = 0;
+ bool is_filtered = false;
char tdir[FILE_MAX], tgroup[GROUP_MAX];
if (BLO_is_a_library(dir, tdir, tgroup)) {
is_filtered = !is_hidden_file(file->relname, hide_dot);
@@ -354,7 +354,7 @@ static int is_filtered_lib(struct direntry *file, const char *dir, unsigned int
return is_filtered;
}
-static int is_filtered_main(struct direntry *file, const char *UNUSED(dir), unsigned int UNUSED(filter), short hide_dot)
+static bool is_filtered_main(struct direntry *file, const char *UNUSED(dir), unsigned int UNUSED(filter), short hide_dot)
{
return !is_hidden_file(file->relname, hide_dot);
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index d329d505138..e00d0f34dd9 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -111,11 +111,11 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* set the parameters from the operator, if it exists */
if (op) {
PropertyRNA *prop;
- const short is_files = (RNA_struct_find_property(op->ptr, "files") != NULL);
- const short is_filepath = (RNA_struct_find_property(op->ptr, "filepath") != NULL);
- const short is_filename = (RNA_struct_find_property(op->ptr, "filename") != NULL);
- const short is_directory = (RNA_struct_find_property(op->ptr, "directory") != NULL);
- const short is_relative_path = (RNA_struct_find_property(op->ptr, "relative_path") != NULL);
+ const bool is_files = (RNA_struct_find_property(op->ptr, "files") != NULL);
+ const bool is_filepath = (RNA_struct_find_property(op->ptr, "filepath") != NULL);
+ const bool is_filename = (RNA_struct_find_property(op->ptr, "filename") != NULL);
+ const bool is_directory = (RNA_struct_find_property(op->ptr, "directory") != NULL);
+ const bool is_relative_path = (RNA_struct_find_property(op->ptr, "relative_path") != NULL);
BLI_strncpy_utf8(params->title, RNA_struct_ui_name(op->type->srna), sizeof(params->title));
@@ -296,9 +296,9 @@ int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *ar)
}
}
-static int is_inside(int x, int y, int cols, int rows)
+static bool is_inside(int x, int y, int cols, int rows)
{
- return ( (x >= 0) && (x < cols) && (y >= 0) && (y < rows) );
+ return ((x >= 0) && (x < cols) && (y >= 0) && (y < rows));
}
FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *rect)