diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 13:51:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 13:54:28 +0300 |
commit | 10c2254d412d7cbee0b0d9f8b7c74a9d3ce69b69 (patch) | |
tree | c430e46e04ed888bcbf44af39b780a2986f513ea /source/blender/editors/space_file | |
parent | 7ec59cc7b700952fdbddfbb44a55977e0bf3bcb6 (diff) |
Cleanup: Continue renaming ARegion variables from ar to region
Continuation of b2ee1770d4c3, now non-single word variables are also
renamed.
Part of T74432.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 32 |
2 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index cb574e35422..8c963e32046 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1869,7 +1869,7 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w { ScrArea *sa = CTX_wm_area(C); SpaceFile *sfile = CTX_wm_space_file(C); - ARegion *region, *ar_ctx = CTX_wm_region(C); + ARegion *region, *region_ctx = CTX_wm_region(C); const bool is_horizontal = (sfile->layout->flag & FILE_LAYOUT_HOR) != 0; int i; @@ -2033,7 +2033,7 @@ static int file_smoothscroll_invoke(bContext *C, wmOperator *UNUSED(op), const w ED_region_tag_redraw(region); /* and restore context */ - CTX_wm_region_set(C, ar_ctx); + CTX_wm_region_set(C, region_ctx); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 1574dbbeb76..59383626972 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -55,7 +55,7 @@ #include "filelist.h" #include "fsmenu.h" -static ARegion *file_execute_region_ensure(ScrArea *sa, ARegion *ar_prev) +static ARegion *file_execute_region_ensure(ScrArea *sa, ARegion *region_prev) { ARegion *region; @@ -64,7 +64,7 @@ static ARegion *file_execute_region_ensure(ScrArea *sa, ARegion *ar_prev) } region = MEM_callocN(sizeof(ARegion), "execute region for file"); - BLI_insertlinkafter(&sa->regionbase, ar_prev, region); + BLI_insertlinkafter(&sa->regionbase, region_prev, region); region->regiontype = RGN_TYPE_EXECUTE; region->alignment = RGN_ALIGN_BOTTOM; region->flag = RGN_FLAG_DYNAMIC_SIZE; @@ -72,7 +72,7 @@ static ARegion *file_execute_region_ensure(ScrArea *sa, ARegion *ar_prev) return region; } -static ARegion *file_tool_props_region_ensure(ScrArea *sa, ARegion *ar_prev) +static ARegion *file_tool_props_region_ensure(ScrArea *sa, ARegion *region_prev) { ARegion *region; @@ -82,7 +82,7 @@ static ARegion *file_tool_props_region_ensure(ScrArea *sa, ARegion *ar_prev) /* add subdiv level; after execute region */ region = MEM_callocN(sizeof(ARegion), "tool props for file"); - BLI_insertlinkafter(&sa->regionbase, ar_prev, region); + BLI_insertlinkafter(&sa->regionbase, region_prev, region); region->regiontype = RGN_TYPE_TOOL_PROPS; region->alignment = RGN_ALIGN_RIGHT; @@ -232,31 +232,31 @@ static void file_ensure_valid_region_state(bContext *C, SpaceFile *sfile, FileSelectParams *params) { - ARegion *ar_ui = BKE_area_find_region_type(sa, RGN_TYPE_UI); - ARegion *ar_props = BKE_area_find_region_type(sa, RGN_TYPE_TOOL_PROPS); - ARegion *ar_execute = BKE_area_find_region_type(sa, RGN_TYPE_EXECUTE); + ARegion *region_ui = BKE_area_find_region_type(sa, RGN_TYPE_UI); + ARegion *region_props = BKE_area_find_region_type(sa, RGN_TYPE_TOOL_PROPS); + ARegion *region_execute = BKE_area_find_region_type(sa, RGN_TYPE_EXECUTE); bool needs_init = false; /* To avoid multiple ED_area_initialize() calls. */ /* If there's an file-operation, ensure we have the option and execute region */ - if (sfile->op && (ar_props == NULL)) { - ar_execute = file_execute_region_ensure(sa, ar_ui); - ar_props = file_tool_props_region_ensure(sa, ar_execute); + if (sfile->op && (region_props == NULL)) { + region_execute = file_execute_region_ensure(sa, region_ui); + region_props = file_tool_props_region_ensure(sa, region_execute); if (params->flag & FILE_HIDE_TOOL_PROPS) { - ar_props->flag |= RGN_FLAG_HIDDEN; + region_props->flag |= RGN_FLAG_HIDDEN; } else { - ar_props->flag &= ~RGN_FLAG_HIDDEN; + region_props->flag &= ~RGN_FLAG_HIDDEN; } needs_init = true; } /* If there's _no_ file-operation, ensure we _don't_ have the option and execute region */ - else if ((sfile->op == NULL) && (ar_props != NULL)) { - BLI_assert(ar_execute != NULL); + else if ((sfile->op == NULL) && (region_props != NULL)) { + BLI_assert(region_execute != NULL); - ED_region_remove(C, sa, ar_props); - ED_region_remove(C, sa, ar_execute); + ED_region_remove(C, sa, region_props); + ED_region_remove(C, sa, region_execute); needs_init = true; } |