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:
authorJulian Eisel <julian@blender.org>2020-03-06 18:56:42 +0300
committerJulian Eisel <julian@blender.org>2020-03-06 19:19:23 +0300
commitb2ee1770d4c31078518f4ec9edd5196a41345162 (patch)
tree6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/space_text/text_header.c
parentb825a95ec311a169d33fe21e28418f11a516c82f (diff)
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/editors/space_text/text_header.c')
-rw-r--r--source/blender/editors/space_text/text_header.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index 846220b95ba..da39ba3c5ad 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -44,24 +44,24 @@
static ARegion *text_has_properties_region(ScrArea *sa)
{
- ARegion *ar, *arnew;
+ ARegion *region, *arnew;
- ar = BKE_area_find_region_type(sa, RGN_TYPE_UI);
- if (ar) {
- return ar;
+ region = BKE_area_find_region_type(sa, RGN_TYPE_UI);
+ if (region) {
+ return region;
}
/* add subdiv level; after header */
- ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
+ region = BKE_area_find_region_type(sa, RGN_TYPE_HEADER);
/* is error! */
- if (ar == NULL) {
+ if (region == NULL) {
return NULL;
}
arnew = MEM_callocN(sizeof(ARegion), "properties region");
- BLI_insertlinkafter(&sa->regionbase, ar, arnew);
+ BLI_insertlinkafter(&sa->regionbase, region, arnew);
arnew->regiontype = RGN_TYPE_UI;
arnew->alignment = RGN_ALIGN_LEFT;
@@ -78,21 +78,21 @@ static bool text_properties_poll(bContext *C)
static int text_text_search_exec(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = text_has_properties_region(sa);
+ ARegion *region = text_has_properties_region(sa);
SpaceText *st = CTX_wm_space_text(C);
- if (ar) {
- if (ar->flag & RGN_FLAG_HIDDEN) {
- ED_region_toggle_hidden(C, ar);
+ if (region) {
+ if (region->flag & RGN_FLAG_HIDDEN) {
+ ED_region_toggle_hidden(C, region);
}
- UI_panel_category_active_set(ar, "Text");
+ UI_panel_category_active_set(region, "Text");
/* cannot send a button activate yet for case when region wasn't visible yet */
/* flag gets checked and cleared in main draw callback */
st->flags |= ST_FIND_ACTIVATE;
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
return OPERATOR_FINISHED;
}