Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/file_ops.c
| Show First 20 Lines • Show All 2,772 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Enter Filter Text Operator | /** \name Enter Filter Text Operator | ||||
| * \{ */ | * \{ */ | ||||
| static int file_start_filter_exec(bContext *C, wmOperator *UNUSED(op)) | static int file_start_filter_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_UI); | |||||
| SpaceFile *sfile = CTX_wm_space_file(C); | SpaceFile *sfile = CTX_wm_space_file(C); | ||||
| FileSelectParams *params = ED_fileselect_get_active_params(sfile); | FileSelectParams *params = ED_fileselect_get_active_params(sfile); | ||||
| ARegion *region_ctx = CTX_wm_region(C); | ARegion *region_ctx = CTX_wm_region(C); | ||||
| if (area) { | |||||
| LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { | |||||
| CTX_wm_region_set(C, region); | CTX_wm_region_set(C, region); | ||||
| UI_textbutton_activate_rna(C, region, params, "filter_search"); | if (UI_textbutton_activate_rna(C, region, params, "filter_search")) { | ||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| CTX_wm_region_set(C, region_ctx); | CTX_wm_region_set(C, region_ctx); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void FILE_OT_start_filter(struct wmOperatorType *ot) | void FILE_OT_start_filter(struct wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| Show All 24 Lines | |||||