You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add methods to add submenus without using names
This commit is contained in:
@@ -1444,18 +1444,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
|
||||
extra_options_remove_branch_list = memnew(PopupMenu);
|
||||
extra_options_remove_branch_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_branch_remove_confirm));
|
||||
extra_options_remove_branch_list->set_name("RemoveBranch");
|
||||
extra_options->get_popup()->add_child(extra_options_remove_branch_list);
|
||||
extra_options->get_popup()->add_submenu_item(TTR("Remove Branch"), "RemoveBranch");
|
||||
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Branch"), extra_options_remove_branch_list);
|
||||
|
||||
extra_options->get_popup()->add_separator();
|
||||
extra_options->get_popup()->add_item(TTR("Create New Remote"), EXTRA_OPTION_CREATE_REMOTE);
|
||||
|
||||
extra_options_remove_remote_list = memnew(PopupMenu);
|
||||
extra_options_remove_remote_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_remote_remove_confirm));
|
||||
extra_options_remove_remote_list->set_name("RemoveRemote");
|
||||
extra_options->get_popup()->add_child(extra_options_remove_remote_list);
|
||||
extra_options->get_popup()->add_submenu_item(TTR("Remove Remote"), "RemoveRemote");
|
||||
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Remote"), extra_options_remove_remote_list);
|
||||
|
||||
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_NEW] = TTR("New");
|
||||
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_MODIFIED] = TTR("Modified");
|
||||
|
||||
Reference in New Issue
Block a user