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:
-rw-r--r--source/blender/editors/space_file/file_intern.h1
-rw-r--r--source/blender/editors/space_file/file_ops.c16
-rw-r--r--source/blender/editors/space_file/filesel.c2
3 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index 7425f2e0385..e7a6cd62a33 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -52,6 +52,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar);
void file_calc_previews(const bContext *C, ARegion *ar);
void file_draw_list(const bContext *C, ARegion *ar);
+void file_draw_check(bContext *C);
void file_draw_check_cb(bContext *C, void *arg1, void *arg2);
bool file_draw_check_exists(SpaceFile *sfile);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 2a7e090b0d2..fe158633439 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -237,7 +237,7 @@ static FileSelect file_select(bContext *C, const rcti *rect, FileSelType select,
}
/* update operator for name change event */
- file_draw_check_cb(C, NULL, NULL);
+ file_draw_check(C);
return retval;
}
@@ -436,6 +436,7 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
const FileCheckType check_type = (sfile->params->flag & FILE_DIRSEL_ONLY) ? CHECK_DIRS : CHECK_FILES;
filelist_select(sfile->files, &sel, FILE_SEL_ADD, FILE_SEL_SELECTED, check_type);
}
+ file_draw_check(C);
ED_area_tag_redraw(sa);
return OPERATOR_FINISHED;
}
@@ -922,7 +923,7 @@ void file_operator_to_sfile(SpaceFile *sfile, wmOperator *op)
/* XXX, files and dirs updates missing, not really so important though */
}
-void file_draw_check_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
+void file_draw_check(bContext *C)
{
SpaceFile *sfile = CTX_wm_space_file(C);
wmOperator *op = sfile->op;
@@ -942,6 +943,12 @@ void file_draw_check_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
}
}
+/* for use with; UI_block_func_set */
+void file_draw_check_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
+{
+ file_draw_check(C);
+}
+
bool file_draw_check_exists(SpaceFile *sfile)
{
if (sfile->op) { /* fails on reload */
@@ -1519,6 +1526,9 @@ void file_filename_enter_handle(bContext *C, void *UNUSED(arg_unused), void *arg
}
}
}
+ else if (matches > 1) {
+ file_draw_check(C);
+ }
}
}
@@ -1621,7 +1631,7 @@ static int file_filenum_exec(bContext *C, wmOperator *op)
if (sfile->params && (inc != 0)) {
BLI_newname(sfile->params->file, inc);
ED_area_tag_redraw(sa);
- file_draw_check_cb(C, NULL, NULL);
+ file_draw_check(C);
// WM_event_add_notifier(C, NC_WINDOW, NULL);
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 317573fe252..3b48af7f957 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -620,7 +620,7 @@ void ED_file_change_dir(bContext *C, const bool checkdir)
folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
- file_draw_check_cb(C, NULL, NULL);
+ file_draw_check(C);
}
}