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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-19 17:28:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-19 17:28:19 +0400
commitaf3e348430218e609c80d86c8dd418bed15e70e8 (patch)
treea93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/editors/interface
parent2f5173887e0c7f6ba19664f16b177e575d82a241 (diff)
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/interface_ops.c4
-rw-r--r--source/blender/editors/interface/interface_panel.c4
-rw-r--r--source/blender/editors/interface/resources.c2
-rw-r--r--source/blender/editors/interface/view2d.c14
6 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 82b6ef641b6..4f0274fbd46 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5222,7 +5222,7 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
but->block->auto_open = FALSE;
if (type == BUTTON_ACTIVATE_OVER) {
- data->used_mouse = 1;
+ data->used_mouse = TRUE;
}
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
@@ -5845,7 +5845,7 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *
else {
if (ISKEYBOARD(event->type)) {
/* keyboard menu hierarchy navigation, going back to previous level */
- but->active->used_mouse = 0;
+ but->active->used_mouse = FALSE;
button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
}
else {
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 958ee9f5420..4c2d86de502 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2679,7 +2679,7 @@ void ui_layout_add_but(uiLayout *layout, uiBut *but)
if (layout->context) {
but->context = layout->context;
- but->context->used = 1;
+ but->context->used = TRUE;
}
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index f2a43580fd8..dfd2d0cc4d0 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -368,7 +368,7 @@ static void UI_OT_reset_default_button(wmOperatorType *ot)
static int copy_to_selected_list(bContext *C, PointerRNA *ptr, ListBase *lb, int *use_path)
{
- *use_path = 0;
+ *use_path = FALSE;
if (RNA_struct_is_a(ptr->type, &RNA_EditBone))
*lb = CTX_data_collection_get(C, "selected_editable_bones");
@@ -381,7 +381,7 @@ static int copy_to_selected_list(bContext *C, PointerRNA *ptr, ListBase *lb, int
if (id && GS(id->name) == ID_OB) {
*lb = CTX_data_collection_get(C, "selected_editable_objects");
- *use_path = 1;
+ *use_path = TRUE;
}
else
return 0;
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index dc2c3b4eea9..cbe44505263 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -754,14 +754,14 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
}
/* we interpolate */
- done = 0;
+ done = FALSE;
ps = panelsort;
for (a = 0; a < tot; a++, ps++) {
if ((ps->pa->flag & PNL_SELECT) == 0) {
if ((ps->orig->ofsx != ps->pa->ofsx) || (ps->orig->ofsy != ps->pa->ofsy)) {
ps->orig->ofsx = floorf(0.5f + fac * (float)ps->pa->ofsx + (1.0f - fac) * (float)ps->orig->ofsx);
ps->orig->ofsy = floorf(0.5f + fac * (float)ps->pa->ofsy + (1.0f - fac) * (float)ps->orig->ofsy);
- done = 1;
+ done = TRUE;
}
}
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 1589bbc123f..bf57dda44bf 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1746,7 +1746,7 @@ void init_userdef_do_versions(void)
rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3);
}
- U.use_16bit_textures = 1;
+ U.use_16bit_textures = TRUE;
}
if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 2)) {
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index ed010dc973a..2eea7f50f33 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -419,14 +419,14 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
/* check if we should restore aspect ratio (if view size changed) */
if (v2d->keepzoom & V2D_KEEPASPECT) {
- short do_x = 0, do_y = 0, do_cur /* , do_win */ /* UNUSED */;
+ short do_x = FALSE, do_y = FALSE, do_cur /* , do_win */ /* UNUSED */;
float /* curRatio, */ /* UNUSED */ winRatio;
/* when a window edge changes, the aspect ratio can't be used to
* find which is the best new 'cur' rect. thats why it stores 'old'
*/
- if (winx != v2d->oldwinx) do_x = 1;
- if (winy != v2d->oldwiny) do_y = 1;
+ if (winx != v2d->oldwinx) do_x = TRUE;
+ if (winy != v2d->oldwiny) do_y = TRUE;
/* curRatio= height / width; */ /* UNUSED */
winRatio = winy / winx;
@@ -435,11 +435,11 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
if (do_x == do_y) {
if (do_x && do_y) {
/* here is 1,1 case, so all others must be 0,0 */
- if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = 0;
- else do_x = 0;
+ if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = FALSE;
+ else do_x = FALSE;
}
- else if (winRatio > 1.0f) do_x = 0;
- else do_x = 1;
+ else if (winRatio > 1.0f) do_x = FALSE;
+ else do_x = TRUE;
}
do_cur = do_x;
/* do_win= do_y; */ /* UNUSED */