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_userpref
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_userpref')
-rw-r--r--source/blender/editors/space_userpref/space_userpref.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c
index 731c8a3028e..e3c1170ddba 100644
--- a/source/blender/editors/space_userpref/space_userpref.c
+++ b/source/blender/editors/space_userpref/space_userpref.c
@@ -47,45 +47,45 @@
static SpaceLink *userpref_new(const ScrArea *area, const Scene *UNUSED(scene))
{
- ARegion *ar;
+ ARegion *region;
SpaceUserPref *spref;
spref = MEM_callocN(sizeof(SpaceUserPref), "inituserpref");
spref->spacetype = SPACE_USERPREF;
/* header */
- ar = MEM_callocN(sizeof(ARegion), "header for userpref");
+ region = MEM_callocN(sizeof(ARegion), "header for userpref");
- BLI_addtail(&spref->regionbase, ar);
- ar->regiontype = RGN_TYPE_HEADER;
+ BLI_addtail(&spref->regionbase, region);
+ region->regiontype = RGN_TYPE_HEADER;
/* Ignore user preference "USER_HEADER_BOTTOM" here (always show bottom for new types). */
- ar->alignment = RGN_ALIGN_BOTTOM;
+ region->alignment = RGN_ALIGN_BOTTOM;
/* navigation region */
- ar = MEM_callocN(sizeof(ARegion), "navigation region for userpref");
+ region = MEM_callocN(sizeof(ARegion), "navigation region for userpref");
- BLI_addtail(&spref->regionbase, ar);
- ar->regiontype = RGN_TYPE_NAV_BAR;
- ar->alignment = RGN_ALIGN_LEFT;
+ BLI_addtail(&spref->regionbase, region);
+ region->regiontype = RGN_TYPE_NAV_BAR;
+ region->alignment = RGN_ALIGN_LEFT;
/* Use smaller size when opened in area like properties editor. */
if (area->winx && area->winx < 3.0f * UI_NAVIGATION_REGION_WIDTH * UI_DPI_FAC) {
- ar->sizex = UI_NARROW_NAVIGATION_REGION_WIDTH;
+ region->sizex = UI_NARROW_NAVIGATION_REGION_WIDTH;
}
/* execution region */
- ar = MEM_callocN(sizeof(ARegion), "execution region for userpref");
+ region = MEM_callocN(sizeof(ARegion), "execution region for userpref");
- BLI_addtail(&spref->regionbase, ar);
- ar->regiontype = RGN_TYPE_EXECUTE;
- ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
- ar->flag |= RGN_FLAG_DYNAMIC_SIZE;
+ BLI_addtail(&spref->regionbase, region);
+ region->regiontype = RGN_TYPE_EXECUTE;
+ region->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV;
+ region->flag |= RGN_FLAG_DYNAMIC_SIZE;
/* main region */
- ar = MEM_callocN(sizeof(ARegion), "main region for userpref");
+ region = MEM_callocN(sizeof(ARegion), "main region for userpref");
- BLI_addtail(&spref->regionbase, ar);
- ar->regiontype = RGN_TYPE_WINDOW;
+ BLI_addtail(&spref->regionbase, region);
+ region->regiontype = RGN_TYPE_WINDOW;
return (SpaceLink *)spref;
}
@@ -111,18 +111,18 @@ static SpaceLink *userpref_duplicate(SpaceLink *sl)
}
/* add handlers, stuff you only do once or on area/region changes */
-static void userpref_main_region_init(wmWindowManager *wm, ARegion *ar)
+static void userpref_main_region_init(wmWindowManager *wm, ARegion *region)
{
/* do not use here, the properties changed in userprefs do a system-wide refresh,
* then scroller jumps back */
- /* ar->v2d.flag &= ~V2D_IS_INITIALISED; */
+ /* region->v2d.flag &= ~V2D_IS_INITIALISED; */
- ar->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;
+ region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;
- ED_region_panels_init(wm, ar);
+ ED_region_panels_init(wm, region);
}
-static void userpref_main_region_layout(const bContext *C, ARegion *ar)
+static void userpref_main_region_layout(const bContext *C, ARegion *region)
{
char id_lower[64];
const char *contexts[2] = {id_lower, NULL};
@@ -142,7 +142,7 @@ static void userpref_main_region_layout(const bContext *C, ARegion *ar)
}
ED_region_panels_layout_ex(
- C, ar, &ar->type->paneltypes, contexts, U.space_data.section_active, true, NULL);
+ C, region, &region->type->paneltypes, contexts, U.space_data.section_active, true, NULL);
}
static void userpref_operatortypes(void)
@@ -154,39 +154,39 @@ static void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf))
}
/* add handlers, stuff you only do once or on area/region changes */
-static void userpref_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar)
+static void userpref_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
{
- ED_region_header_init(ar);
+ ED_region_header_init(region);
}
-static void userpref_header_region_draw(const bContext *C, ARegion *ar)
+static void userpref_header_region_draw(const bContext *C, ARegion *region)
{
- ED_region_header(C, ar);
+ ED_region_header(C, region);
}
/* add handlers, stuff you only do once or on area/region changes */
-static void userpref_navigation_region_init(wmWindowManager *wm, ARegion *ar)
+static void userpref_navigation_region_init(wmWindowManager *wm, ARegion *region)
{
- ar->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;
+ region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;
- ED_region_panels_init(wm, ar);
+ ED_region_panels_init(wm, region);
}
-static void userpref_navigation_region_draw(const bContext *C, ARegion *ar)
+static void userpref_navigation_region_draw(const bContext *C, ARegion *region)
{
- ED_region_panels(C, ar);
+ ED_region_panels(C, region);
}
/* add handlers, stuff you only do once or on area/region changes */
-static void userpref_execute_region_init(wmWindowManager *wm, ARegion *ar)
+static void userpref_execute_region_init(wmWindowManager *wm, ARegion *region)
{
- ED_region_panels_init(wm, ar);
- ar->v2d.keepzoom |= V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y;
+ ED_region_panels_init(wm, region);
+ region->v2d.keepzoom |= V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y;
}
static void userpref_main_region_listener(wmWindow *UNUSED(win),
ScrArea *UNUSED(sa),
- ARegion *UNUSED(ar),
+ ARegion *UNUSED(region),
wmNotifier *UNUSED(wmn),
const Scene *UNUSED(scene))
{
@@ -195,7 +195,7 @@ static void userpref_main_region_listener(wmWindow *UNUSED(win),
static void userpref_header_listener(wmWindow *UNUSED(win),
ScrArea *UNUSED(sa),
- ARegion *UNUSED(ar),
+ ARegion *UNUSED(region),
wmNotifier *UNUSED(wmn),
const Scene *UNUSED(scene))
{
@@ -210,7 +210,7 @@ static void userpref_header_listener(wmWindow *UNUSED(win),
static void userpref_navigation_region_listener(wmWindow *UNUSED(win),
ScrArea *UNUSED(sa),
- ARegion *UNUSED(ar),
+ ARegion *UNUSED(region),
wmNotifier *UNUSED(wmn),
const Scene *UNUSED(scene))
{
@@ -219,7 +219,7 @@ static void userpref_navigation_region_listener(wmWindow *UNUSED(win),
static void userpref_execute_region_listener(wmWindow *UNUSED(win),
ScrArea *UNUSED(sa),
- ARegion *UNUSED(ar),
+ ARegion *UNUSED(region),
wmNotifier *UNUSED(wmn),
const Scene *UNUSED(scene))
{