From 2f348d8b5d7d897ad44d192a2fd5f2b99b906c76 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 24 Mar 2012 02:51:46 +0000 Subject: style cleanup: mainly for mesh code, also some WM function use. --- source/blender/editors/space_outliner/outliner_draw.c | 16 ++++++++-------- source/blender/editors/space_outliner/outliner_edit.c | 8 ++++---- source/blender/editors/space_outliner/outliner_ops.c | 2 +- source/blender/editors/space_outliner/outliner_select.c | 10 +++++----- source/blender/editors/space_outliner/outliner_tree.c | 2 +- source/blender/editors/space_outliner/space_outliner.c | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 12b93e17f9f..5cc09bf7d97 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -584,7 +584,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *arg2) { wmOperatorType *ot= arg2; - wmKeyMapItem *kmi= arg_kmi; + wmKeyMapItem *kmi = arg_kmi; if(ot) BLI_strncpy(kmi->idname, ot->idname, OP_MAX_TYPENAME); @@ -616,7 +616,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi) static char search[OP_MAX_TYPENAME]; wmEvent event; wmWindow *win= CTX_wm_window(C); - wmKeyMapItem *kmi= arg_kmi; + wmKeyMapItem *kmi = arg_kmi; wmOperatorType *ot= WM_operatortype_find(kmi->idname, 0); uiBlock *block; uiBut *but; @@ -630,7 +630,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi) /* fake button, it holds space for search items */ uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); - but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, ""); + but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, ""); uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot); uiBoundsBlock(block, 6); @@ -735,7 +735,7 @@ static const char *keymap_tweak_dir_menu(void) static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v)) { - wmKeyMapItem *kmi= kmi_v; + wmKeyMapItem *kmi = kmi_v; short maptype= keymap_menu_type(kmi->type); if(maptype!=kmi->maptype) { @@ -778,7 +778,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo int butw3= 43; /* modifiers */ if(tselem->type == TSE_KEYMAP_ITEM) { - wmKeyMapItem *kmi= te->directdata; + wmKeyMapItem *kmi = te->directdata; /* modal map? */ if(kmi->propvalue); @@ -791,7 +791,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo kmi->maptype= keymap_menu_type(kmi->type); str= keymap_type_menu(); - but= uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->maptype, 0, 0, 0, 0, "Event type"); + but = uiDefButS(block, MENU, 0, str, xstart, (int)te->ys+1, butw2, UI_UNIT_Y-1, &kmi->maptype, 0, 0, 0, 0, "Event type"); uiButSetFunc(but, keymap_type_cb, kmi, NULL); xstart+= butw2+5; @@ -902,7 +902,7 @@ static void tselem_draw_icon_uibut(struct DrawIconArg *arg, int icon) } else { /* XXX investigate: button placement of icons is way different than UI_icon_draw? */ float ufac= UI_UNIT_X/20.0f; - uiBut *but= uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : ""); + uiBut *but = uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : ""); if(arg->id) uiButSetDragID(but, arg->id); @@ -917,7 +917,7 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto /* make function calls a bit compacter */ arg.block= block; arg.id= tselem->id; - arg.xmax= xmax; + arg.xmax = xmax; arg.x= x; arg.y= y; arg.alpha= alpha; diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 27f0231ad05..cdd566f6da9 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -612,8 +612,8 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op)) ytop= (int)(te->ys + (v2d->mask.ymax - v2d->mask.ymin)/2); if (ytop>0) ytop= 0; - v2d->cur.ymax= (float)ytop; - v2d->cur.ymin= (float)(ytop-(v2d->mask.ymax - v2d->mask.ymin)); + v2d->cur.ymax = (float)ytop; + v2d->cur.ymin = (float)(ytop-(v2d->mask.ymax - v2d->mask.ymin)); /* make te->xs ==> te->xend center of view */ xdelta = (int)(te->xs - v2d->cur.xmin); @@ -791,8 +791,8 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so /* make te->ys center of view */ ytop= (int)(te->ys + (ar->v2d.mask.ymax-ar->v2d.mask.ymin)/2); if(ytop>0) ytop= 0; - ar->v2d.cur.ymax= (float)ytop; - ar->v2d.cur.ymin= (float)(ytop-(ar->v2d.mask.ymax-ar->v2d.mask.ymin)); + ar->v2d.cur.ymax = (float)ytop; + ar->v2d.cur.ymin = (float)(ytop-(ar->v2d.mask.ymax-ar->v2d.mask.ymin)); /* make te->xs ==> te->xend center of view */ xdelta = (int)(te->xs - ar->v2d.cur.xmin); diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index 17434d0f6c9..d2ef4573ccf 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -84,7 +84,7 @@ void outliner_operatortypes(void) void outliner_keymap(wmKeyConfig *keyconf) { - wmKeyMap *keymap= WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0); + wmKeyMap *keymap = WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0); wmKeyMapItem *kmi; WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index ef9077d09ed..8270d26d974 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -644,7 +644,7 @@ static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeS static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te, TreeStoreElem *UNUSED(tselem), int set) { - wmKeyMapItem *kmi= te->directdata; + wmKeyMapItem *kmi = te->directdata; if(set==0) { if(kmi->flag & KMI_INACTIVE) return 0; @@ -909,12 +909,12 @@ static int outliner_border_select_exec(bContext *C, wmOperator *op) rctf rectf; int gesture_mode= RNA_int_get(op->ptr, "gesture_mode"); - rect.xmin= RNA_int_get(op->ptr, "xmin"); - rect.ymin= RNA_int_get(op->ptr, "ymin"); + rect.xmin = RNA_int_get(op->ptr, "xmin"); + rect.ymin = RNA_int_get(op->ptr, "ymin"); UI_view2d_region_to_view(&ar->v2d, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin); - rect.xmax= RNA_int_get(op->ptr, "xmax"); - rect.ymax= RNA_int_get(op->ptr, "ymax"); + rect.xmax = RNA_int_get(op->ptr, "xmax"); + rect.ymax = RNA_int_get(op->ptr, "ymax"); UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax); for(te= soops->tree.first; te; te= te->next) { diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index d8a9e75ebc6..b702bea5168 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1075,7 +1075,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i if(TSELEM_OPEN(tselem,soops)) { a= 0; - for (kmi= km->items.first; kmi; kmi= kmi->next, a++) { + for (kmi = km->items.first; kmi; kmi = kmi->next, a++) { const char *key= WM_key_event_string(kmi->type); if(key[0]) { diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index ebbe28e62fa..d55fe40653e 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -66,7 +66,7 @@ static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar) UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0); + keymap = WM_keymap_find(wm->defaultconf, "Outliner", SPACE_OUTLINER, 0); /* don't pass on view2d mask, it's always set with scrollbar space, hide fails */ WM_event_add_keymap_handler_bb(&ar->handlers, keymap, NULL, &ar->winrct); -- cgit v1.2.3