Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-11-05 16:07:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-05 16:12:28 +0300
commit58dc114615449b8fc13e3b05ec3c21390547f5c7 (patch)
tree1d0ff6108d39c3bbcc98e0443e3a437ec5a97399 /source/blender/editors
parentd2ea1b2dcd536cc8a9e53bd830f0095f6bf9e2fe (diff)
parent18d7fbe4f58c86f6f91b1e9e5c1f7f0c593a1d0f (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface.c25
-rw-r--r--source/blender/editors/interface/interface_handlers.c9
-rw-r--r--source/blender/editors/interface/interface_layout.c7
-rw-r--r--source/blender/editors/interface/interface_region_tooltip.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c5
-rw-r--r--source/blender/editors/transform/transform.c6
6 files changed, 33 insertions, 21 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 0d166b874cb..234355c8581 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -985,7 +985,9 @@ void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_str
}
}
-static bool ui_but_event_operator_string(const bContext *C, uiBut *but, char *buf, const size_t buf_len)
+static bool ui_but_event_operator_string(
+ const bContext *C, uiBut *but,
+ char *buf, const size_t buf_len)
{
MenuType *mt;
bool found = false;
@@ -993,7 +995,10 @@ 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_len, buf)) {
+ if (WM_key_event_operator_string(
+ C, but->optype->idname, but->opcontext, prop, true,
+ buf, buf_len))
+ {
found = true;
}
}
@@ -1008,8 +1013,9 @@ 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_len, buf))
+ if (WM_key_event_operator_string(
+ C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, true,
+ buf, buf_len))
{
found = true;
}
@@ -1021,8 +1027,10 @@ static bool ui_but_event_operator_string(const bContext *C, uiBut *but, char *bu
return found;
}
-static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but, char *buf, const size_t buf_len)
-{
+static bool ui_but_event_property_operator_string(
+ const bContext *C, uiBut *but,
+ char *buf, const size_t buf_len)
+{
/* context toggle operator names to check... */
const char *ctx_toggle_opnames[] = {
"WM_OT_context_toggle",
@@ -1116,8 +1124,9 @@ static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but,
/* check each until one works... */
for (i = 0; (i < num_ops) && (ctx_toggle_opnames[i]); i++) {
- if (WM_key_event_operator_string(C, ctx_toggle_opnames[i], WM_OP_INVOKE_REGION_WIN, prop_path, false,
- buf_len, buf))
+ if (WM_key_event_operator_string(
+ C, ctx_toggle_opnames[i], WM_OP_INVOKE_REGION_WIN, prop_path, false,
+ buf, buf_len))
{
found = true;
break;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 84252c03742..2947365fc5d 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1288,7 +1288,7 @@ static bool ui_drag_toggle_set_xy_xy(
}
}
if (changed) {
- /* apply now, not on release (or if handlers are cancelled for whatever reason) */
+ /* apply now, not on release (or if handlers are canceled for whatever reason) */
ui_apply_but_funcs_after(C);
}
@@ -6542,8 +6542,9 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event))
IDProperty *prop = (but->opptr) ? but->opptr->data : NULL;
/* complex code to change name of button */
- if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, true,
- sizeof(shortcut_str), shortcut_str))
+ if (WM_key_event_operator_string(
+ C, but->optype->idname, but->opcontext, prop, true,
+ shortcut_str, sizeof(shortcut_str)))
{
ui_but_add_shortcut(but, shortcut_str, true);
}
@@ -8031,7 +8032,7 @@ static void button_activate_exit(
ui_but_update(but);
/* adds empty mousemove in queue for re-init handler, in case mouse is
- * still over a button. we cannot just check for this ourselfs because
+ * still over a button. We cannot just check for this ourselves because
* at this point the mouse may be over a button in another region */
if (mousemove)
WM_event_add_mousemove(C);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 23ac1c5027d..d43b7511977 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -710,7 +710,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, false, sizeof(buf), buf);
+ WM_keymap_item_to_string(ptr->data, false, buf, sizeof(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);
@@ -2017,8 +2017,9 @@ void uiItemMenuEnumO_ptr(
(ot->prop && ot->invoke))
{
char keybuf[128];
- if (WM_key_event_operator_string(C, ot->idname, layout->root->opcontext, NULL, false,
- sizeof(keybuf), keybuf))
+ if (WM_key_event_operator_string(
+ C, ot->idname, layout->root->opcontext, NULL, false,
+ keybuf, sizeof(keybuf)))
{
ui_but_add_shortcut(but, keybuf, false);
}
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c
index e3d90ceb7a2..70e0f07ea6c 100644
--- a/source/blender/editors/interface/interface_region_tooltip.c
+++ b/source/blender/editors/interface/interface_region_tooltip.c
@@ -337,7 +337,7 @@ static uiTooltipData *ui_tooltip_data_from_keymap(bContext *C, wmKeyMap *keymap)
.color_id = UI_TIP_LC_NORMAL,
});
bool found = false;
- if (WM_keymap_item_to_string(kmi, false, sizeof(buf), buf)) {
+ if (WM_keymap_item_to_string(kmi, false, buf, sizeof(buf))) {
found = true;
}
field->text = BLI_sprintfN(TIP_("Shortcut: %s"), found ? buf : "None");
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index b52c4c3afb1..ae2c691b9d8 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -3615,8 +3615,9 @@ 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,
- sizeof(name) - len - 1, &name[len + 1]))
+ if (WM_key_event_operator_string(
+ C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, true,
+ &name[len + 1], sizeof(name) - len - 1))
{
name[len] = UI_SEP_CHAR;
}
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 40309b701a4..494cf3459df 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -4370,7 +4370,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_
const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ? IFACE_("right") : IFACE_("left");
char str_km[64];
- WM_modalkeymap_items_to_string(t->keymap, TFM_MODAL_INSERTOFS_TOGGLE_DIR, true, sizeof(str_km), str_km);
+ WM_modalkeymap_items_to_string(t->keymap, TFM_MODAL_INSERTOFS_TOGGLE_DIR, true, str_km, sizeof(str_km));
ofs += BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("Auto-offset set to %s - press %s to toggle direction | %s"),
str_dir, str_km, str_old);
@@ -4586,7 +4586,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
if (t->keymap) {
wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_RESIZE);
if (kmi) {
- ofs += WM_keymap_item_to_string(kmi, false, sizeof(str) - ofs, str + ofs);
+ ofs += WM_keymap_item_to_string(kmi, false, str + ofs, sizeof(str) - ofs);
}
}
BLI_snprintf(str + ofs, sizeof(str) - ofs, IFACE_(" or Alt) Even Thickness %s"),
@@ -8030,7 +8030,7 @@ static void headerSeqSlide(TransInfo *t, const float val[2], char str[UI_MAX_DRA
if (t->keymap) {
wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE);
if (kmi) {
- ofs += WM_keymap_item_to_string(kmi, false, UI_MAX_DRAW_STR - ofs, str + ofs);
+ ofs += WM_keymap_item_to_string(kmi, false, str + ofs, UI_MAX_DRAW_STR - ofs);
}
}
ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" or Alt) Expand to fit %s"),