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:
authorAndrea Weikert <elubie@gmx.net>2011-03-20 13:22:51 +0300
committerAndrea Weikert <elubie@gmx.net>2011-03-20 13:22:51 +0300
commit5325f3b2e989a3b94e2d9450c574e4610d2005d8 (patch)
tree83275fe6127348ed6a10616e0dc84505bccc0526 /source/blender/editors/space_file/filelist.h
parent5442e725a5b534b8d843c9cd3c451eee167355b3 (diff)
== file browser ==
Patch from Alexander Kuznetsov: Toggle selection rather than just extending. Implements behaviour that unintendedly was available with previously using macro operator for selection. This was removed and now the functionality is properly implemented. Patch accepted with minor changes: 1. Used enum rather than #defines and added value for removing from selection (deselect) 2. Moved if (select) outside file_select_do and improved check for whether last file in selection is actually selected. (Necessary since toggle can deselect and toggle select should still make file active) 3. Additionally fixed check in file_select_invoke to be consistent with border select.
Diffstat (limited to 'source/blender/editors/space_file/filelist.h')
-rw-r--r--source/blender/editors/space_file/filelist.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 399a8ff7943..3e3b52ed17c 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -52,6 +52,11 @@ struct rcti;
struct ReportList;
struct FileSelection;
+typedef enum FileSelType {
+ FILE_SEL_REMOVE = 0,
+ FILE_SEL_ADD = 1,
+ FILE_SEL_TOGGLE = 2
+} FileSelType;
struct FileList * filelist_new(short type);
void filelist_init_icons(void);
@@ -63,7 +68,7 @@ int filelist_numfiles(struct FileList* filelist);
const char * filelist_dir(struct FileList* filelist);
void filelist_setdir(struct FileList* filelist, const char *dir);
struct direntry * filelist_file(struct FileList* filelist, int index);
-void filelist_select(struct FileList* filelist, FileSelection* sel, short select, unsigned int flag);
+void filelist_select(struct FileList* filelist, FileSelection* sel, FileSelType select, unsigned int flag);
void filelist_hidedot(struct FileList* filelist, short hide);
void filelist_setfilter(struct FileList* filelist, unsigned int filter);
void filelist_setfilter_types(struct FileList* filelist, const char *filter_glob);