diff options
Diffstat (limited to 'source/blender/editors/interface')
9 files changed, 36 insertions, 38 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 0f298f5cbef..be54e6a2feb 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -386,7 +386,7 @@ void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad float raddiff; int i, passes=4; - /* get the colour and divide up the alpha */ + /* get the color and divide up the alpha */ glGetFloatv(GL_CURRENT_COLOR, color); alpha = 1; //color[3]; color[3]= 0.5*alpha/(float)passes; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 22f1771923b..8724b7fad28 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1068,19 +1068,19 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, /* text/string and ID data */ else if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) { - uiHandleButtonData *data= but->active; + uiHandleButtonData *active_data= but->active; if(but->poin==NULL && but->rnapoin.data==NULL); else if(mode=='c') { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - BLI_strncpy(buf, data->str, UI_MAX_DRAW_STR); - WM_clipboard_text_set(data->str, 0); - data->cancel= 1; + BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR); + WM_clipboard_text_set(active_data->str, 0); + active_data->cancel= 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - BLI_strncpy(data->str, buf, data->maxlen); + BLI_strncpy(active_data->str, buf, active_data->maxlen); button_activate_state(C, but, BUTTON_STATE_EXIT); } } @@ -1281,7 +1281,7 @@ static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char asc return changed; } -void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump) +static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump) { char *str; int len; @@ -1384,7 +1384,7 @@ void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int s } } -void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select) +static void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select) { char *str; diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index e39e594af66..8533e5ba893 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -455,7 +455,7 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha) glDisable(GL_LINE_SMOOTH); } -static void init_brush_icons() +static void init_brush_icons(void) { #define INIT_BRUSH_ICON(icon_id, name) \ @@ -500,7 +500,7 @@ static void init_brush_icons() #undef INIT_BRUSH_ICON } -static void init_internal_icons() +static void init_internal_icons(void) { bTheme *btheme= U.themes.first; ImBuf *bbuf= NULL; @@ -731,7 +731,7 @@ void UI_icons_free_drawinfo(void *drawinfo) } } -static DrawInfo *icon_create_drawinfo() +static DrawInfo *icon_create_drawinfo(void) { DrawInfo *di = NULL; diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 4e669746c2f..4c166251268 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -716,17 +716,17 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname for(i=0; i<totitem; i++) { if(item[i].identifier[0]) { if(properties) { - PointerRNA ptr; + PointerRNA tptr; - WM_operator_properties_create(&ptr, opname); - if(ptr.data) { - IDP_FreeProperty(ptr.data); - MEM_freeN(ptr.data); + WM_operator_properties_create(&tptr, opname); + if(tptr.data) { + IDP_FreeProperty(tptr.data); + MEM_freeN(tptr.data); } - ptr.data= IDP_CopyProperty(properties); - RNA_enum_set(&ptr, propname, item[i].value); + tptr.data= IDP_CopyProperty(properties); + RNA_enum_set(&tptr, propname, item[i].value); - uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, ptr.data, context, flag); + uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, tptr.data, context, flag); } else uiItemEnumO(column, opname, (char*)item[i].name, item[i].icon, propname, item[i].value); @@ -2548,7 +2548,7 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y) /* XXX silly trick, interface_templates.c doesn't get linked * because it's not used by other files in this module? */ { - void ui_template_fix_linking(); + void ui_template_fix_linking(void); ui_template_fix_linking(); } } diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 0747d772cdf..6b834c08456 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1833,7 +1833,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR width= PICKER_TOTAL_W; butwidth = width - UI_UNIT_X - 10; - /* existence of profile means storage is in linear colour space, with display correction */ + /* existence of profile means storage is in linear color space, with display correction */ if (block->color_profile == BLI_PR_NONE) { sprintf(tip, "Value in Display Color Space"); copy_v3_v3(rgb_gamma, rgb); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 75daa7633a4..ae75bd03d86 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -55,7 +55,7 @@ #include "BLF_api.h" -void ui_template_fix_linking() +void ui_template_fix_linking(void) { } @@ -1959,7 +1959,6 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon) static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, const char *activepropname) { - Object *ob; uiBlock *block= uiLayoutGetBlock(layout); uiBut *but; uiLayout *split, *overlap, *sub, *row; @@ -2024,7 +2023,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe } } else if(itemptr->type == &RNA_ShapeKey) { - ob= (Object*)activeptr->data; + Object *ob= (Object*)activeptr->data; split= uiLayoutSplit(sub, 0.75f, 0); @@ -2324,9 +2323,9 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) } if(WM_jobs_test(wm, owner)) { - uiLayout *abs; + uiLayout *ui_abs; - abs = uiLayoutAbsolute(layout, 0); + ui_abs= uiLayoutAbsolute(layout, 0); uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE, 0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, "Stop this job"); @@ -2349,7 +2348,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) Report *report= BKE_reports_last_displayable(reports); ReportTimerInfo *rti; - uiLayout *abs; + uiLayout *ui_abs; uiBlock *block; uiBut *but; uiStyle *style= U.uistyles.first; @@ -2363,8 +2362,8 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) if (!rti || rti->widthfac==0.0 || !report) return; - abs = uiLayoutAbsolute(layout, 0); - block= uiLayoutGetBlock(abs); + ui_abs= uiLayoutAbsolute(layout, 0); + block= uiLayoutGetBlock(ui_abs); width = BLF_width(style->widget.uifont_id, report->message); width = MIN2(rti->widthfac*width, width); @@ -2373,7 +2372,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) /* make a box around the report to make it stand out */ uiBlockBeginAlign(block); but= uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); - /* set the report's bg colour in but->col - ROUNDBOX feature */ + /* set the report's bg color in but->col - ROUNDBOX feature */ but->col[0]= FTOCHAR(rti->col[0]); but->col[1]= FTOCHAR(rti->col[1]); but->col[2]= FTOCHAR(rti->col[2]); diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 2a6ab525f89..403c7001b3b 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -24,7 +24,6 @@ */ #include <limits.h> -#include <math.h> #include <stdlib.h> #include <string.h> #include <assert.h> @@ -1120,7 +1119,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB */ -static struct uiWidgetStateColors wcol_state= { +static struct uiWidgetStateColors wcol_state_colors= { {115, 190, 76, 255}, {90, 166, 51, 255}, {240, 235, 100, 255}, @@ -1390,7 +1389,7 @@ void ui_widget_color_init(ThemeUI *tui) tui->wcol_list_item= wcol_list_item; tui->wcol_progress= wcol_progress; - tui->wcol_state= wcol_state; + tui->wcol_state= wcol_state_colors; } /* ************ button callbacks, state ***************** */ @@ -2325,10 +2324,10 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat ui_get_but_vectorf(but, col); if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) { - // draw based on state - colour for keyed etc + // draw based on state - color for keyed etc widgetbase_draw(&wtb, wcol); - // inset to draw swatch colour + // inset to draw swatch color rect->xmin+= SWATCH_KEYED_BORDER; rect->xmax-= SWATCH_KEYED_BORDER; rect->ymin+= SWATCH_KEYED_BORDER; @@ -2496,7 +2495,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED( VECCOPY(old_col, wcol->inner); - /* abuse but->hsv - if it's non-zero, use this colour as the box's background */ + /* abuse but->hsv - if it's non-zero, use this color as the box's background */ if (but->col[3]) { wcol->inner[0] = but->col[0]; wcol->inner[1] = but->col[1]; diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index b6fa0916443..2bc72d717c0 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1182,7 +1182,7 @@ void init_userdef_do_versions(void) if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) { bTheme *btheme; for (btheme= U.themes.first; btheme; btheme= btheme->next) { - /* these should all use the same colour */ + /* these should all use the same color */ SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255); SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255); diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 6be2a018b71..af63b9cf37e 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1167,7 +1167,7 @@ typedef struct v2dScrollerMove { ARegion *ar; /* region that the scroller is in */ short scroller; /* scroller that mouse is in ('h' or 'v') */ - short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active colour?) + short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active color?) float fac; /* view adjustment factor, based on size of region */ float delta; /* amount moved by mouse on axis of interest */ |