UI: make text editor Text menu consistent with menus for .blend and images.

This commit is contained in:
Brecht Van Lommel
2019-03-04 15:24:23 +01:00
parent 10d9a2494f
commit 708eb55018
2 changed files with 9 additions and 8 deletions

View File

@@ -200,20 +200,21 @@ class TEXT_MT_text(Menu):
st = context.space_data
text = st.text
layout.operator("text.new")
layout.operator("text.open")
layout.operator("text.new", text="New")
layout.operator("text.open", text="Open...", icon='FILE_FOLDER')
if text:
layout.separator()
layout.operator("text.reload")
layout.column()
layout.operator("text.save")
layout.operator("text.save_as")
layout.separator()
layout.operator("text.save", icon='FILE_TICK')
layout.operator("text.save_as", text="Save As...")
if text.filepath:
layout.operator("text.make_internal")
layout.column()
layout.separator()
layout.operator("text.run_script")

View File

@@ -186,7 +186,7 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op))
void TEXT_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Create Text Block";
ot->name = "New Text";
ot->idname = "TEXT_OT_new";
ot->description = "Create a new text data-block";
@@ -280,7 +280,7 @@ static int text_open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e
void TEXT_OT_open(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Open Text Block";
ot->name = "Open Text";
ot->idname = "TEXT_OT_open";
ot->description = "Open a new text data-block";