diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-07-03 16:44:38 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-07-03 16:55:22 +0300 |
commit | 9133f5a3571b9c8b05cfb6b04a09fd03fd439988 (patch) | |
tree | 1dcd33f2a3bc336d2fadce52f80dfaf4e782dcab /source/blender/editors/interface | |
parent | 947cdb3acd296d8e2e849586d5a41cc0d0dcb28c (diff) |
Cleanup: 'return' parameters to the end of functions, and use 'r_' prefix for them.
Diffstat (limited to 'source/blender/editors/interface')
4 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 1a62fb4b3ae..e788f1027e1 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -960,9 +960,7 @@ static bool ui_but_event_operator_string(const bContext *C, uiBut *but, char *bu if (but->optype) { IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; - if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, true, - buf, buf_len)) - { + if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, true, buf_len, buf)) { found = true; } } @@ -977,8 +975,7 @@ static bool ui_but_event_operator_string(const bContext *C, uiBut *but, char *bu IDP_AssignString(prop_menu_name, mt->idname, sizeof(mt->idname)); - if (WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, true, - buf, buf_len)) + if (WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, true, buf_len, buf)) { found = true; } @@ -1083,7 +1080,7 @@ static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but, for (i = 0; (i < num_ops) && (ctx_toggle_opnames[i]); i++) { //printf("\t%s\n", ctx_toggle_opnames[i]); if (WM_key_event_operator_string(C, ctx_toggle_opnames[i], WM_OP_INVOKE_REGION_WIN, prop_path, false, - buf, buf_len)) + buf_len, buf)) { found = true; break; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index c51d9906fa5..e80afa825de 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6287,7 +6287,7 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event)) /* complex code to change name of button */ if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, true, - shortcut_str, sizeof(shortcut_str))) + sizeof(shortcut_str), shortcut_str)) { ui_but_add_shortcut(but, shortcut_str, true); } diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 0e30ba54d1c..6b16bc95d7f 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -668,7 +668,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n if (RNA_struct_is_a(ptr->type, &RNA_KeyMapItem)) { char buf[128]; - WM_keymap_item_to_string(ptr->data, buf, sizeof(buf), false); + WM_keymap_item_to_string(ptr->data, false, sizeof(buf), buf); but = uiDefButR_prop(block, UI_BTYPE_HOTKEY_EVENT, 0, buf, x, y, w, h, ptr, prop, 0, 0, 0, -1, -1, NULL); UI_but_func_set(but, ui_keymap_but_cb, but, NULL); @@ -1921,7 +1921,7 @@ void uiItemMenuEnumO(uiLayout *layout, bContext *C, const char *opname, const ch { char keybuf[128]; if (WM_key_event_operator_string(C, ot->idname, layout->root->opcontext, NULL, false, - keybuf, sizeof(keybuf))) + sizeof(keybuf), keybuf)) { ui_but_add_shortcut(but, keybuf, false); } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index c3b58e2d1c1..6a551e955de 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -3299,7 +3299,7 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char /* check for hotkey */ if (len < sizeof(name) - 6) { if (WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, true, - &name[len + 1], sizeof(name) - len - 1)) + sizeof(name) - len - 1, &name[len + 1])) { name[len] = UI_SEP_CHAR; } |