diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-05 03:27:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-05 03:29:31 +0300 |
commit | 0b98a679bb799fe496be67d8dd52fadef3c1027a (patch) | |
tree | 83302b41f2481cf9aad168459dce08a971b9d0fb /source/blender/editors/space_file | |
parent | 50cb8013ebf8e421a16428756dd869ab844b41f6 (diff) |
UI: rename Border Select -> Box Select
See: T56648
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 30 | ||||
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 6 |
3 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index 48acbdb137d..710aa472a8b 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -73,7 +73,7 @@ void FILE_OT_highlight(struct wmOperatorType *ot); void FILE_OT_select(struct wmOperatorType *ot); void FILE_OT_select_walk(struct wmOperatorType *ot); void FILE_OT_select_all(struct wmOperatorType *ot); -void FILE_OT_select_border(struct wmOperatorType *ot); +void FILE_OT_select_box(struct wmOperatorType *ot); void FILE_OT_select_bookmark(struct wmOperatorType *ot); void FILE_OT_bookmark_add(struct wmOperatorType *ot); void FILE_OT_bookmark_delete(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index c70829f08f4..a583dce51c8 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -113,7 +113,7 @@ typedef enum FileSelect { static void clamp_to_filelist(int numfiles, FileSelection *sel) { - /* border select before the first file */ + /* box select before the first file */ if ( (sel->first < 0) && (sel->last >= 0) ) { sel->first = 0; } @@ -338,7 +338,7 @@ static FileSelect file_select(bContext *C, const rcti *rect, FileSelType select, return retval; } -static int file_border_select_find_last_selected( +static int file_box_select_find_last_selected( SpaceFile *sfile, ARegion *ar, const FileSelection *sel, const int mouse_xy[2]) { @@ -371,7 +371,7 @@ static int file_border_select_find_last_selected( return (dist_first < dist_last) ? sel->first : sel->last; } -static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent *event) +static int file_box_select_modal(bContext *C, wmOperator *op, const wmEvent *event) { ARegion *ar = CTX_wm_region(C); SpaceFile *sfile = CTX_wm_space_file(C); @@ -381,7 +381,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * int result; - result = WM_gesture_border_modal(C, op, event); + result = WM_gesture_box_modal(C, op, event); if (result == OPERATOR_RUNNING_MODAL) { WM_operator_properties_border_to_rcti(op, &rect); @@ -399,7 +399,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * for (idx = sel.last; idx >= 0; idx--) { const FileDirEntry *file = filelist_file(sfile->files, idx); - /* dont highlight readonly file (".." or ".") on border select */ + /* dont highlight readonly file (".." or ".") on box select */ if (FILENAME_IS_CURRPAR(file->relpath)) { filelist_entry_select_set(sfile->files, file, FILE_SEL_REMOVE, FILE_SEL_HIGHLIGHTED, CHECK_ALL); } @@ -411,7 +411,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * } } params->sel_first = sel.first; params->sel_last = sel.last; - params->active_file = file_border_select_find_last_selected(sfile, ar, &sel, event->mval); + params->active_file = file_box_select_find_last_selected(sfile, ar, &sel, event->mval); } else { params->highlight_file = -1; @@ -424,7 +424,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, const wmEvent * return result; } -static int file_border_select_exec(bContext *C, wmOperator *op) +static int file_box_select_exec(bContext *C, wmOperator *op) { ARegion *ar = CTX_wm_region(C); SpaceFile *sfile = CTX_wm_space_file(C); @@ -455,22 +455,22 @@ static int file_border_select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void FILE_OT_select_border(wmOperatorType *ot) +void FILE_OT_select_box(wmOperatorType *ot) { /* identifiers */ - ot->name = "Border Select"; + ot->name = "Box Select"; ot->description = "Activate/select the file(s) contained in the border"; - ot->idname = "FILE_OT_select_border"; + ot->idname = "FILE_OT_select_box"; /* api callbacks */ - ot->invoke = WM_gesture_border_invoke; - ot->exec = file_border_select_exec; - ot->modal = file_border_select_modal; + ot->invoke = WM_gesture_box_invoke; + ot->exec = file_box_select_exec; + ot->modal = file_box_select_modal; ot->poll = ED_operator_file_active; - ot->cancel = WM_gesture_border_cancel; + ot->cancel = WM_gesture_box_cancel; /* properties */ - WM_operator_properties_gesture_border_select(ot); + WM_operator_properties_gesture_box_select(ot); } static int file_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index f05c18d31d5..4b02c5be2f0 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -462,7 +462,7 @@ static void file_operatortypes(void) WM_operatortype_append(FILE_OT_select); WM_operatortype_append(FILE_OT_select_walk); WM_operatortype_append(FILE_OT_select_all); - WM_operatortype_append(FILE_OT_select_border); + WM_operatortype_append(FILE_OT_select_box); WM_operatortype_append(FILE_OT_select_bookmark); WM_operatortype_append(FILE_OT_highlight); WM_operatortype_append(FILE_OT_execute); @@ -588,8 +588,8 @@ static void file_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "FILE_OT_next", BUTTON5MOUSE, KM_CLICK, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_select_all", AKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "FILE_OT_select_border", BKEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "FILE_OT_select_border", EVT_TWEAK_L, KM_ANY, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select_box", BKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "FILE_OT_select_box", EVT_TWEAK_L, KM_ANY, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "FILE_OT_highlight", MOUSEMOVE, KM_ANY, KM_ANY, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0); |