diff options
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/util/SConscript | 2 | ||||
-rw-r--r-- | source/blender/editors/util/undo.c | 8 |
3 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index eb0286716f3..8eab2fda545 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -20,6 +20,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/util/SConscript b/source/blender/editors/util/SConscript index 16501c59551..0a49c9c24a6 100644 --- a/source/blender/editors/util/SConscript +++ b/source/blender/editors/util/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../bmesh' incs += ' ../../blenloader' diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index ac264c1a6af..5f0fc9d105c 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -44,6 +44,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_global.h" @@ -456,7 +458,9 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) } if (name) { - item_tmp.identifier = item_tmp.name = name; + item_tmp.identifier = name; + /* XXX This won’t work with non-default contexts (e.g. operators) :/ */ + item_tmp.name = IFACE_(name); if (active) item_tmp.icon = ICON_RESTRICT_VIEW_OFF; else @@ -484,7 +488,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem); if (totitem > 0) { - uiPopupMenu *pup = uiPupMenuBegin(C, op->type->name, ICON_NONE); + uiPopupMenu *pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE); uiLayout *layout = uiPupMenuLayout(pup); uiLayout *split = uiLayoutSplit(layout, 0, 0), *column = NULL; int i, c; |