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:
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index febd1820e5c..2ccba2e35f0 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -514,7 +514,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
opptr = uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */
/* so the context is passed to itemf functions (some py itemf functions use it) */
- WM_operator_properties_sanitize(opptr, FALSE);
+ WM_operator_properties_sanitize(opptr, false);
str = WM_operator_pystring(C, but->optype, opptr, 0);
@@ -742,8 +742,8 @@ typedef struct uiSearchboxData {
uiFontStyle fstyle;
uiSearchItems items;
int active; /* index in items array */
- int noback; /* when menu opened with enough space for this */
- int preview; /* draw thumbnail previews, rather than list */
+ bool noback; /* when menu opened with enough space for this */
+ bool preview; /* draw thumbnail previews, rather than list */
int prv_rows, prv_cols;
} uiSearchboxData;
@@ -751,12 +751,12 @@ typedef struct uiSearchboxData {
/* exported for use by search callbacks */
/* returns zero if nothing to add */
-int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid)
+bool uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid)
{
/* hijack for autocomplete */
if (items->autocpl) {
autocomplete_do_name(items->autocpl, name);
- return 1;
+ return true;
}
/* hijack for finding active item */
@@ -764,18 +764,18 @@ int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int icon
if (poin == items->active)
items->offset_i = items->totitem;
items->totitem++;
- return 1;
+ return true;
}
if (items->totitem >= items->maxitem) {
items->more = 1;
- return 0;
+ return false;
}
/* skip first items in list */
if (items->offset_i > 0) {
items->offset_i--;
- return 1;
+ return true;
}
if (items->names)
@@ -787,7 +787,7 @@ int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int icon
items->totitem++;
- return 1;
+ return true;
}
int uiSearchBoxHeight(void)
@@ -867,11 +867,11 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr)
}
/* x and y in screencoords */
-int ui_searchbox_inside(ARegion *ar, int x, int y)
+bool ui_searchbox_inside(ARegion *ar, int x, int y)
{
uiSearchboxData *data = ar->regiondata;
- return(BLI_rcti_isect_pt(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin));
+ return BLI_rcti_isect_pt(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin);
}
/* string validated to be of correct length (but->hardmax) */
@@ -1023,7 +1023,7 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
/* pixel space */
wmOrtho2(-0.01f, ar->winx - 0.01f, -0.01f, ar->winy - 0.01f);
- if (!data->noback)
+ if (data->noback == false)
ui_draw_search_back(NULL, NULL, &data->bbox); /* style not used yet */
/* draw text */
@@ -1136,10 +1136,10 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
/* special case, hardcoded feature, not draw backdrop when called from menus,
* assume for design that popup already added it */
if (but->block->flag & UI_BLOCK_SEARCH_MENU)
- data->noback = 1;
+ data->noback = true;
if (but->a1 > 0 && but->a2 > 0) {
- data->preview = 1;
+ data->preview = true;
data->prv_rows = but->a1;
data->prv_cols = but->a2;
}
@@ -2236,7 +2236,7 @@ uiBlock *ui_block_func_COLOR(bContext *C, uiPopupBlockHandle *handle, void *arg_
{
uiBut *but = arg_but;
uiBlock *block;
- int show_picker = TRUE;
+ bool show_picker = true;
block = uiBeginBlock(C, handle->region, __func__, UI_EMBOSS);
@@ -2703,7 +2703,7 @@ void uiPupMenuInvoke(bContext *C, const char *idname)
uiPopupMenu *pup;
uiLayout *layout;
Menu menu;
- MenuType *mt = WM_menutype_find(idname, TRUE);
+ MenuType *mt = WM_menutype_find(idname, true);
if (mt == NULL) {
printf("%s: named menu \"%s\" not found\n", __func__, idname);