diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-02 08:51:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-02 08:51:15 +0400 |
commit | f7f4148b4004c225a30bb80794094b574fbea744 (patch) | |
tree | d8ede9dbd62d0558a303c0d0634b8efd1f0a95ae /source/blender/editors/interface/interface_regions.c | |
parent | 9865ee7637cd58622329c7dbe05c78bc4fe65308 (diff) |
change uiButGetStrInfo() to use a trailing NULL arg rather then passing the number of args as an arg.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 7c099de9c1e..2c4f2e1d33b 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -426,7 +426,6 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) rctf rect_fl; rcti rect_i; - const int nbr_info = 6; uiStringInfo but_tip = {BUT_GET_TIP, NULL}; uiStringInfo enum_label = {BUT_GET_RNAENUM_LABEL, NULL}; uiStringInfo enum_tip = {BUT_GET_RNAENUM_TIP, NULL}; @@ -440,7 +439,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) /* create tooltip data */ data = MEM_callocN(sizeof(uiTooltipData), "uiTooltipData"); - uiButGetStrInfo(C, but, nbr_info, &but_tip, &enum_label, &enum_tip, &op_keymap, &rna_struct, &rna_prop); + uiButGetStrInfo(C, but, &but_tip, &enum_label, &enum_tip, &op_keymap, &rna_struct, &rna_prop, NULL); /* special case, enum rna buttons only have enum item description, * use general enum description too before the specific one */ @@ -616,13 +615,16 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } #else if ((U.flag & USER_TOOLTIPS_PYTHON) == 0 && !but->optype && rna_struct.strinfo) { - if (rna_prop.strinfo) + if (rna_prop.strinfo) { /* Struct and prop */ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s.%s"), rna_struct.strinfo, rna_prop.strinfo); - else + } + else { /* Only struct (e.g. menus) */ - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s"), rna_struct.strinfo); + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), + TIP_("Python: %s"), rna_struct.strinfo); + } data->color_id[data->totline] = UI_TIP_LC_PYTHON; data->totline++; } |