diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-13 23:59:29 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-13 23:59:29 +0400 |
commit | 4c1c092fb95f1ee8edf05e91280e0ac71521ccd1 (patch) | |
tree | 4daf9b26b2218a0663106b8a36d54aaa640d6ae2 /source/blender/windowmanager | |
parent | 455b8212b6f64184979a292247bebd081a1e75d9 (diff) |
Fixed (or partly fixed) various missing UI translations, mainly with some specific ops invocations (popup menus…), and (to some extent) with the undo/redo stuff.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 4bc510ef54b..be7913b9181 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -666,7 +666,7 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) return retval; } else { - pup = uiPupMenuBegin(C, IFACE_(op->type->name), ICON_NONE); + pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE); layout = uiPupMenuLayout(pup); uiItemsFullEnumO(layout, op->type->idname, RNA_property_identifier(prop), op->ptr->data, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); @@ -700,7 +700,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons RNA_property_enum_items((bContext *)C, &ptr, prop, &item_array, NULL, &do_free); for (item = item_array; item->identifier; item++) { - /* note: need to give the intex rather than the dientifier because the enum can be freed */ + /* note: need to give the index rather than the identifier because the enum can be freed */ if (BLI_strcasestr(item->name, str)) if (0 == uiSearchItemAdd(items, item->name, SET_INT_IN_POINTER(item->value), 0)) break; @@ -741,7 +741,9 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op) block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_RET_1 | UI_BLOCK_MOVEMOUSE_QUIT); - //uiDefBut(block, LABEL, 0, op->type->name, 10, 10, 180, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); // ok, this isn't so easy... +#if 0 /* ok, this isn't so easy... */ + uiDefBut(block, LABEL, 0, RNA_struct_ui_name(op->type->srna), 10, 10, 180, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); +#endif but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9 * UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); uiButSetSearchFunc(but, operator_enum_search_cb, op->type, operator_enum_call_cb, NULL); @@ -961,7 +963,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) if (op->type->flag & OPTYPE_MACRO) { for (op = op->macro.first; op; op = op->next) { - uiItemL(layout, op->type->name, ICON_NONE); + uiItemL(layout, RNA_struct_ui_name(op->type->srna), ICON_NONE); uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE); } } |