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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-22 04:35:38 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-29 20:49:01 +0400
commit77719bfd0669cc675ad729f4c51672173842faca (patch)
treeaf0882068e0a90dacf10f19fef4380a8d8c91af4 /source/blender/editors/space_file/filesel.c
parent6a6c7b10de85c2ed01ca68f95d6c70f81522f3d3 (diff)
File Browser: autocomplete keeps focus in the file field when entering a folder.
There is a bunch of internal refactoring going on too: * No longer use operators to handle these directory and file fields, only makes things more complicated than they should be. * Handle autocomplete partial/full match deeper in the UI code * Directory field still does not keep focus, that's for another time to fix, you can already do pretty quick keyboard only navigation with the file field. Reviewed By: elubie Differential Revision: http://developer.blender.org/D29
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r--source/blender/editors/space_file/filesel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 3cda5dd5e80..ff0add36bdc 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -634,7 +634,7 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matche
return match;
}
-bool autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
+int autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
{
SpaceFile *sfile = CTX_wm_space_file(C);
int match = AUTOCOMPLETE_NO_MATCH;
@@ -684,10 +684,10 @@ bool autocomplete_directory(struct bContext *C, char *str, void *UNUSED(arg_v))
}
}
- return match == AUTOCOMPLETE_FULL_MATCH;
+ return match;
}
-bool autocomplete_file(struct bContext *C, char *str, void *UNUSED(arg_v))
+int autocomplete_file(struct bContext *C, char *str, void *UNUSED(arg_v))
{
SpaceFile *sfile = CTX_wm_space_file(C);
int match = AUTOCOMPLETE_NO_MATCH;
@@ -706,7 +706,8 @@ bool autocomplete_file(struct bContext *C, char *str, void *UNUSED(arg_v))
}
match = autocomplete_end(autocpl, str);
}
- return match == AUTOCOMPLETE_FULL_MATCH;
+
+ return match;
}
void ED_fileselect_clear(struct wmWindowManager *wm, struct SpaceFile *sfile)