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>2018-06-04 10:31:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
commit44505b38df557a5711703613685a1dec9fc2c3d9 (patch)
tree3f05bebcc7bfadf56569f2dcca7f95fc56b1b0d0 /source/blender/editors/space_file/filesel.c
parent6654e109df952be3a3128fae2508a02c196ae593 (diff)
Cleanup: strip trailing space in editors
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 7bd6e7a738e..99307b1961d 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -223,7 +223,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
else {
params->flag &= ~FILE_HIDE_DOT;
}
-
+
if (params->type == FILE_LOADLIB) {
params->flag |= RNA_boolean_get(op->ptr, "link") ? FILE_LINK : 0;
@@ -365,12 +365,12 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *r
if (layout == NULL)
return sel;
-
+
colmin = (rect->xmin) / (layout->tile_w + 2 * layout->tile_border_x);
rowmin = (rect->ymin) / (layout->tile_h + 2 * layout->tile_border_y);
colmax = (rect->xmax) / (layout->tile_w + 2 * layout->tile_border_x);
rowmax = (rect->ymax) / (layout->tile_h + 2 * layout->tile_border_y);
-
+
if (is_inside(colmin, rowmin, layout->columns, layout->rows) ||
is_inside(colmax, rowmax, layout->columns, layout->rows) )
{
@@ -379,12 +379,12 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *r
CLAMP(colmax, 0, layout->columns - 1);
CLAMP(rowmax, 0, layout->rows - 1);
}
-
+
if ((colmin > layout->columns - 1) || (rowmin > layout->rows - 1)) {
sel.first = -1;
}
else {
- if (layout->flag & FILE_LAYOUT_HOR)
+ if (layout->flag & FILE_LAYOUT_HOR)
sel.first = layout->rows * colmin + rowmin;
else
sel.first = colmin + layout->columns * rowmin;
@@ -393,7 +393,7 @@ FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *r
sel.last = -1;
}
else {
- if (layout->flag & FILE_LAYOUT_HOR)
+ if (layout->flag & FILE_LAYOUT_HOR)
sel.last = layout->rows * colmax + rowmax;
else
sel.last = colmax + layout->columns * rowmax;
@@ -409,14 +409,14 @@ int ED_fileselect_layout_offset(FileLayout *layout, int x, int y)
if (layout == NULL)
return -1;
-
+
offsetx = (x) / (layout->tile_w + 2 * layout->tile_border_x);
offsety = (y) / (layout->tile_h + 2 * layout->tile_border_y);
-
+
if (offsetx > layout->columns - 1) return -1;
if (offsety > layout->rows - 1) return -1;
-
- if (layout->flag & FILE_LAYOUT_HOR)
+
+ if (layout->flag & FILE_LAYOUT_HOR)
active_file = layout->rows * offsetx + offsety;
else
active_file = offsetx + layout->columns * offsety;
@@ -610,12 +610,12 @@ void ED_file_change_dir(bContext *C)
int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matched_file)
{
int match = 0;
-
+
int i;
FileDirEntry *file;
int n = filelist_files_ensure(sfile->files);
- /* select any file that matches the pattern, this includes exact match
+ /* select any file that matches the pattern, this includes exact match
* if the user selects a single file by entering the filename
*/
for (i = 0; i < n; i++) {
@@ -644,7 +644,7 @@ int autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
DIR *dir;
struct dirent *de;
-
+
BLI_split_dir_part(str, dirname, sizeof(dirname));
dir = opendir(dirname);
@@ -659,7 +659,7 @@ int autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
else {
char path[FILE_MAX];
BLI_stat_t status;
-
+
BLI_join_dirfile(path, sizeof(path), dirname, de->d_name);
if (BLI_stat(path, &status) == 0) {
@@ -725,7 +725,7 @@ void ED_fileselect_exit(wmWindowManager *wm, ScrArea *sa, SpaceFile *sfile)
folderlist_free(sfile->folders_prev);
folderlist_free(sfile->folders_next);
-
+
if (sfile->files) {
ED_fileselect_clear(wm, sa, sfile);
filelist_free(sfile->files);