diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-11-08 14:42:42 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-11-08 14:42:42 +0100 |
commit | b04b54609206e6aa84d0c59f764f33570dfc62c1 (patch) | |
tree | 2609459b93a438ab99062afb7f68fd5cb97da9c0 /editor/plugins/script_text_editor.cpp | |
parent | 3e7f638d7b574785f521beafaf52a6ad95be016f (diff) | |
download | redot-engine-b04b54609206e6aa84d0c59f764f33570dfc62c1.tar.gz |
Fix node names of submenu items across the editor
Also removes some programmer remarks and fixes some docs.
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 5b67c6d509..9ed997dca7 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -2238,7 +2238,7 @@ void ScriptTextEditor::_enable_code_editor() { edit_menu->get_popup()->add_separator(); { PopupMenu *sub_menu = memnew(PopupMenu); - sub_menu->set_name("line_menu"); + sub_menu->set_name("LineMenu"); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_up"), EDIT_MOVE_LINE_UP); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/move_down"), EDIT_MOVE_LINE_DOWN); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent"), EDIT_INDENT); @@ -2247,46 +2247,46 @@ void ScriptTextEditor::_enable_code_editor() { sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT); sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option)); edit_menu->get_popup()->add_child(sub_menu); - edit_menu->get_popup()->add_submenu_item(TTR("Line"), "line_menu"); + edit_menu->get_popup()->add_submenu_item(TTR("Line"), "LineMenu"); } { PopupMenu *sub_menu = memnew(PopupMenu); - sub_menu->set_name("folding_menu"); + sub_menu->set_name("FoldingMenu"); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_fold_line"), EDIT_TOGGLE_FOLD_LINE); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/create_code_region"), EDIT_CREATE_CODE_REGION); sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option)); edit_menu->get_popup()->add_child(sub_menu); - edit_menu->get_popup()->add_submenu_item(TTR("Folding"), "folding_menu"); + edit_menu->get_popup()->add_submenu_item(TTR("Folding"), "FoldingMenu"); } edit_menu->get_popup()->add_separator(); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE); edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE); { PopupMenu *sub_menu = memnew(PopupMenu); - sub_menu->set_name("indent_menu"); + sub_menu->set_name("IndentMenu"); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS); sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT); sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option)); edit_menu->get_popup()->add_child(sub_menu); - edit_menu->get_popup()->add_submenu_item(TTR("Indentation"), "indent_menu"); + edit_menu->get_popup()->add_submenu_item(TTR("Indentation"), "IndentMenu"); } edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option)); edit_menu->get_popup()->add_separator(); { PopupMenu *sub_menu = memnew(PopupMenu); - sub_menu->set_name("convert_case"); + sub_menu->set_name("ConvertCase"); sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_uppercase", TTR("Uppercase"), KeyModifierMask::SHIFT | Key::F4), EDIT_TO_UPPERCASE); sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/convert_to_lowercase", TTR("Lowercase"), KeyModifierMask::SHIFT | Key::F5), EDIT_TO_LOWERCASE); sub_menu->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KeyModifierMask::SHIFT | Key::F6), EDIT_CAPITALIZE); sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option)); edit_menu->get_popup()->add_child(sub_menu); - edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "convert_case"); + edit_menu->get_popup()->add_submenu_item(TTR("Convert Case"), "ConvertCase"); } edit_menu->get_popup()->add_child(highlighter_menu); - edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "highlighter_menu"); + edit_menu->get_popup()->add_submenu_item(TTR("Syntax Highlighter"), "HighlighterMenu"); highlighter_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter)); edit_hb->add_child(search_menu); @@ -2309,13 +2309,13 @@ void ScriptTextEditor::_enable_code_editor() { goto_menu->get_popup()->add_separator(); goto_menu->get_popup()->add_child(bookmarks_menu); - goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "Bookmarks"); + goto_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "BookmarksMenu"); _update_bookmark_list(); bookmarks_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_bookmark_list)); bookmarks_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_bookmark_item_pressed)); goto_menu->get_popup()->add_child(breakpoints_menu); - goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "Breakpoints"); + goto_menu->get_popup()->add_submenu_item(TTR("Breakpoints"), "BreakpointsMenu"); _update_breakpoint_list(); breakpoints_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_breakpoint_list)); breakpoints_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_breakpoint_item_pressed)); @@ -2378,7 +2378,7 @@ ScriptTextEditor::ScriptTextEditor() { edit_menu->set_shortcut_context(this); highlighter_menu = memnew(PopupMenu); - highlighter_menu->set_name("highlighter_menu"); + highlighter_menu->set_name("HighlighterMenu"); Ref<EditorPlainTextSyntaxHighlighter> plain_highlighter; plain_highlighter.instantiate(); @@ -2400,10 +2400,10 @@ ScriptTextEditor::ScriptTextEditor() { goto_menu->set_shortcut_context(this); bookmarks_menu = memnew(PopupMenu); - bookmarks_menu->set_name("Bookmarks"); + bookmarks_menu->set_name("BookmarksMenu"); breakpoints_menu = memnew(PopupMenu); - breakpoints_menu->set_name("Breakpoints"); + breakpoints_menu->set_name("BreakpointsMenu"); connection_info_dialog = memnew(ConnectionInfoDialog); |