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>2018-06-20 11:45:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-20 11:45:03 +0300
commitd4519f54b30171ee3a0e38901ffb291ab4d87cae (patch)
tree2343abb289a9a1123c912006f5ab993284bef83c /source/blender/editors/interface
parent0a8af46707a2a507524754e4195f2366169e9dca (diff)
UI: only show "Edit Translations" when addon used
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index aae552c274b..536327c465b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -61,6 +61,7 @@
#include "PIL_time.h"
+#include "BKE_addon.h"
#include "BKE_colorband.h"
#include "BKE_blender_undo.h"
#include "BKE_brush.h"
@@ -7140,7 +7141,10 @@ static bool ui_but_menu(bContext *C, uiBut *but)
if (ui_block_is_menu(but->block) == false) {
uiItemFullO(layout, "UI_OT_editsource", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, NULL);
}
- uiItemFullO(layout, "UI_OT_edittranslation_init", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, NULL);
+
+ if (BKE_addon_find(&U.addons, "ui_translate")) {
+ uiItemFullO(layout, "UI_OT_edittranslation_init", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0, NULL);
+ }
mt = WM_menutype_find("WM_MT_button_context", true);
if (mt) {