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:
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 18b256d061d..613ab2fa6c8 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4399,23 +4399,32 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiPopupMenu *pup;
uiLayout *layout;
int length;
- const char *name;
+ char *name;
+ uiStringInfo label = {BUT_GET_LABEL, NULL};
- if ((but->rnapoin.data && but->rnaprop) == 0 && but->optype == NULL)
- return 0;
+/* if ((but->rnapoin.data && but->rnaprop) == 0 && but->optype == NULL)*/
+/* return 0;*/
button_timers_tooltip_remove(C, but);
+#if 0
if (but->rnaprop)
name = RNA_property_ui_name(but->rnaprop);
else if (but->optype && but->optype->srna)
name = RNA_struct_ui_name(but->optype->srna);
else
name = IFACE_("<needs_name>"); // XXX - should never happen.
+#else
+ uiButGetStrInfo(C, but, 1, &label);
+ name = label.strinfo;
+#endif
pup = uiPupMenuBegin(C, name, ICON_NONE);
layout = uiPupMenuLayout(pup);
-
+
+ if (label.strinfo)
+ MEM_freeN(label.strinfo);
+
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT);
if (but->rnapoin.data && but->rnaprop) {
@@ -4642,8 +4651,8 @@ static int ui_but_menu(bContext *C, uiBut *but)
}
/* perhaps we should move this into (G.debug & G_DEBUG) - campbell */
- uiItemFullO(layout, "UI_OT_editsource", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Edit Source"),
- ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0);
+ uiItemFullO(layout, "UI_OT_editsource", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0);
+ uiItemFullO(layout, "UI_OT_edittranslation_init", NULL, ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0);
uiPupMenuEnd(C, pup);