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:
authorJulian Eisel <julian@blender.org>2021-07-07 19:15:16 +0300
committerJulian Eisel <julian@blender.org>2021-07-07 19:41:27 +0300
commit13672f8b3244c7c834789f3edb058d938bdd1168 (patch)
tree527d3a6295a4faf08a7acf2248e92b9c79d1dce1 /source/blender/editors/space_file/filesel.c
parentcffbfe55682073de39ab93fe676e495e62145e12 (diff)
Cleanup: Move file deselection function to more appropriate file
`filesel.c` seems like the place that should contain file selection functions. Previously it was in `file_ops.c` because that was the only file that actually used it. But a followup commit needs it from a different file.
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 4e59e4ba06e..664929b09fc 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -1086,6 +1086,15 @@ void ED_file_change_dir(bContext *C)
ED_file_change_dir_ex(C, area);
}
+void file_select_deselect_all(SpaceFile *sfile, uint flag)
+{
+ FileSelection sel;
+ sel.first = 0;
+ sel.last = filelist_files_ensure(sfile->files) - 1;
+
+ filelist_entries_select_index_range_set(sfile->files, &sel, FILE_SEL_REMOVE, flag, CHECK_ALL);
+}
+
int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matched_file)
{
int match = 0;