[Bf-blender-cvs] [176b0df9207] blender2.8: Cleanup: gcc function type warning
Campbell Barton
noreply at git.blender.org
Tue Nov 20 20:29:48 CET 2018
Commit: 176b0df92079bb7a1ab456b97055f01e0cc784db
Author: Campbell Barton
Date: Wed Nov 21 05:32:23 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB176b0df92079bb7a1ab456b97055f01e0cc784db
Cleanup: gcc function type warning
===================================================================
M source/blender/editors/interface/interface_templates.c
===================================================================
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 1d9a2433217..45a3ef9690e 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2360,34 +2360,39 @@ static void colorband_tools_dofunc(bContext *C, void *coba_v, int event)
}
static uiBlock *colorband_tools_func(
- bContext *C, ARegion *ar, ColorBand *coba)
+ bContext *C, ARegion *ar, void *coba_v)
{
- uiBut *bt;
+ ColorBand *coba = coba_v;
uiBlock *block;
short yco = 0, menuwidth = 10 * UI_UNIT_X;
block = UI_block_begin(C, ar, __func__, UI_EMBOSS);
UI_block_func_butmenu_set(block, colorband_tools_dofunc, coba);
-
+
{
+ uiBut *but;
uiDefIconTextBut(
- block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1, IFACE_("Flip Color Ramp"),
- 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, CB_FUNC_FLIP, "");
+ block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1,
+ IFACE_("Flip Color Ramp"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0, CB_FUNC_FLIP, "");
uiDefIconTextBut(
- block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1, IFACE_("Distribute Stops from Left"),
- 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, CB_FUNC_DISTRIBUTE_LR, "");
+ block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1,
+ IFACE_("Distribute Stops from Left"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0, CB_FUNC_DISTRIBUTE_LR, "");
uiDefIconTextBut(
- block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1, IFACE_("Distribute Stops Evenly"),
- 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, CB_FUNC_DISTRIBUTE_EVENLY, "");
- bt = uiDefIconTextButO(
- block, UI_BTYPE_BUT_MENU, "UI_OT_eyedropper_colorband", WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER, IFACE_("Eyedropper"),
- 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, "");
- bt->custom_data = coba;
+ block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1,
+ IFACE_("Distribute Stops Evenly"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y,
+ NULL, 0.0, 0.0, 0, CB_FUNC_DISTRIBUTE_EVENLY, "");
+ but = uiDefIconTextButO(
+ block, UI_BTYPE_BUT_MENU, "UI_OT_eyedropper_colorband", WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER,
+ IFACE_("Eyedropper"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y,
+ "");
+ but->custom_data = coba;
uiDefIconTextBut(
- block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1, IFACE_("Reset Color Ramp"),
- 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, CB_FUNC_RESET, "");
+ block, UI_BTYPE_BUT_MENU, 1, ICON_BLANK1, IFACE_("Reset Color Ramp"),
+ 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, CB_FUNC_RESET, "");
}
-
+
UI_block_direction_set(block, UI_DIR_DOWN);
UI_block_bounds_set_text(block, 3.0f * UI_UNIT_X);
More information about the Bf-blender-cvs
mailing list