experenental manual linking from the UI. realize this is an issue which is not agreed on so probably this will be disabled for release.
the data is stored here so more dev can commit: ./release/scripts/addons/modules/rna_wiki_reference.py
This commit is contained in:
@@ -4597,6 +4597,11 @@ static int ui_but_menu(bContext *C, uiBut *but)
|
||||
BLI_snprintf(buf, sizeof(buf), "%s.%s",
|
||||
RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
|
||||
|
||||
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view_manual");
|
||||
RNA_string_set(&ptr_props, "doc_id", buf);
|
||||
uiItemFullO(layout, "WM_OT_doc_view_manual", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"),
|
||||
ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
|
||||
|
||||
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view");
|
||||
RNA_string_set(&ptr_props, "doc_id", buf);
|
||||
uiItemFullO(layout, "WM_OT_doc_view", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Python Documentation"),
|
||||
@@ -4614,18 +4619,26 @@ static int ui_but_menu(bContext *C, uiBut *but)
|
||||
else if (but->optype) {
|
||||
WM_operator_py_idname(buf, but->optype->idname);
|
||||
|
||||
|
||||
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view_manual");
|
||||
RNA_string_set(&ptr_props, "doc_id", buf);
|
||||
uiItemFullO(layout, "WM_OT_doc_view_manual", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"),
|
||||
ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
|
||||
|
||||
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view");
|
||||
RNA_string_set(&ptr_props, "doc_id", buf);
|
||||
uiItemFullO(layout, "WM_OT_doc_view", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Python Documentation"),
|
||||
ICON_NONE, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
|
||||
|
||||
|
||||
/* XXX inactive option, not for public! */
|
||||
#if 0
|
||||
WM_operator_properties_create(&ptr_props, "WM_OT_doc_edit");
|
||||
RNA_string_set(&ptr_props, "doc_id", buf);
|
||||
RNA_string_set(&ptr_props, "doc_new", but->optype->description);
|
||||
|
||||
uiItemFullO(layout, "WM_OT_doc_edit", CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Submit Description"),
|
||||
ICON_NONE, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user