diff options
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 20 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d.c | 8 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4cdff1e9253..6a8a248a58f 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -721,7 +721,7 @@ static bool ui_drag_toggle_set_xy_xy(bContext *C, ARegion *ar, const bool is_set { /* popups such as layers won't re-evaluate on redraw */ const bool do_check = (ar->regiontype == RGN_TYPE_TEMPORARY); - bool change = false; + bool changed = false; uiBlock *block; for (block = ar->uiblocks.first; block; block = block->next) { @@ -749,7 +749,7 @@ static bool ui_drag_toggle_set_xy_xy(bContext *C, ARegion *ar, const bool is_set if (do_check) { ui_check_but(but); } - change = true; + changed = true; } } /* done */ @@ -759,7 +759,7 @@ static bool ui_drag_toggle_set_xy_xy(bContext *C, ARegion *ar, const bool is_set } } - return change; + return changed; } static void ui_drag_toggle_set(bContext *C, uiDragToggleHandle *drag_info, const int xy_input[2]) @@ -1630,14 +1630,14 @@ static bool ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data) { char *str = data->str; const int len = strlen(str); - bool change = false; + bool changed = false; if (but->selsta != but->selend && len) { memmove(str + but->selsta, str + but->selend, (len - but->selend) + 1); - change = true; + changed = true; } but->pos = but->selend = but->selsta; - return change; + return changed; } /* note, but->block->aspect is used here, when drawing button style is getting scaled too */ @@ -1925,19 +1925,19 @@ static bool ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int directi static bool ui_textedit_autocomplete(bContext *C, uiBut *but, uiHandleButtonData *data) { char *str; - bool change = true; + bool changed = true; str = data->str; if (data->searchbox) - change = ui_searchbox_autocomplete(C, data->searchbox, but, data->str); + changed = ui_searchbox_autocomplete(C, data->searchbox, but, data->str); else - change = but->autocomplete_func(C, str, but->autofunc_arg); + changed = but->autocomplete_func(C, str, but->autofunc_arg); but->pos = strlen(str); but->selsta = but->selend = but->pos; - return change; + return changed; } /* mode for ui_textedit_copypaste() */ diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 037fa7c6a94..e3787789165 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -174,7 +174,7 @@ static void view2d_masks(View2D *v2d, int check_scrollers) */ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) { - short tot_changed = 0, do_init; + bool tot_changed = false, do_init; uiStyle *style = UI_GetStyle(); do_init = (v2d->flag & V2D_IS_INITIALISED) == 0; @@ -937,11 +937,11 @@ void UI_view2d_totRect_set(View2D *v2d, int width, int height) } -int UI_view2d_tab_set(View2D *v2d, int tab) +bool UI_view2d_tab_set(View2D *v2d, int tab) { float default_offset[2] = {0.0f, 0.0f}; float *offset, *new_offset; - int changed = 0; + bool changed = false; /* if tab changed, change offset */ if (tab != v2d->tab_cur && v2d->tab_offset) { @@ -958,7 +958,7 @@ int UI_view2d_tab_set(View2D *v2d, int tab) /* validation should happen in subsequent totRect_set */ - changed = 1; + changed = true; } /* resize array if needed */ diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index c5c9b1c8ce4..ce6f77afaac 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1288,10 +1288,10 @@ void UI_view2d_smooth_view(bContext *C, ARegion *ar, } if (smooth_viewtx && fac > FLT_EPSILON) { - int changed = FALSE; + bool changed = false; if (BLI_rctf_compare(&sms.new_cur, &v2d->cur, FLT_EPSILON) == FALSE) - changed = TRUE; + changed = true; /* The new view is different from the old one * so animate the view */ |