feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -222,8 +222,7 @@ void VersionControlEditorPlugin::_refresh_commit_list() {
|
|||
|
||||
List<EditorVCSInterface::Commit> commit_info_list = EditorVCSInterface::get_singleton()->get_previous_commits(commit_list_size_button->get_selected_metadata());
|
||||
|
||||
for (List<EditorVCSInterface::Commit>::Element *e = commit_info_list.front(); e; e = e->next()) {
|
||||
EditorVCSInterface::Commit commit = e->get();
|
||||
for (const EditorVCSInterface::Commit &commit : commit_info_list) {
|
||||
TreeItem *item = commit_list->create_item();
|
||||
|
||||
// Only display the first line of a commit message
|
||||
|
|
@ -370,8 +369,7 @@ void VersionControlEditorPlugin::_refresh_stage_area() {
|
|||
unstaged_files->get_root()->clear_children();
|
||||
|
||||
List<EditorVCSInterface::StatusFile> status_files = EditorVCSInterface::get_singleton()->get_modified_files_data();
|
||||
for (List<EditorVCSInterface::StatusFile>::Element *E = status_files.front(); E; E = E->next()) {
|
||||
EditorVCSInterface::StatusFile sf = E->get();
|
||||
for (const EditorVCSInterface::StatusFile &sf : status_files) {
|
||||
if (sf.area == EditorVCSInterface::TREE_AREA_STAGED) {
|
||||
_add_new_item(staged_files, sf.file_path, sf.change_type);
|
||||
} else if (sf.area == EditorVCSInterface::TREE_AREA_UNSTAGED) {
|
||||
|
|
@ -548,7 +546,7 @@ void VersionControlEditorPlugin::_cell_button_pressed(Object *p_item, int p_colu
|
|||
|
||||
file_path = "res://" + file_path;
|
||||
if (ResourceLoader::get_resource_type(file_path) == "PackedScene") {
|
||||
EditorNode::get_singleton()->open_request(file_path);
|
||||
EditorNode::get_singleton()->load_scene(file_path);
|
||||
} else if (file_path.ends_with(".gd")) {
|
||||
EditorNode::get_singleton()->load_resource(file_path);
|
||||
ScriptEditor::get_singleton()->reload_scripts();
|
||||
|
|
@ -908,7 +906,7 @@ void VersionControlEditorPlugin::fetch_available_vcs_plugin_names() {
|
|||
}
|
||||
|
||||
void VersionControlEditorPlugin::register_editor() {
|
||||
EditorDockManager::get_singleton()->add_dock(version_commit_dock, "", EditorDockManager::DOCK_SLOT_RIGHT_UL);
|
||||
EditorDockManager::get_singleton()->add_dock(version_commit_dock, "", EditorDockManager::DOCK_SLOT_RIGHT_UL, ED_SHORTCUT_AND_COMMAND("docks/open_version_control", TTRC("Open Version Control Dock")));
|
||||
|
||||
version_control_dock_button = EditorNode::get_bottom_panel()->add_item(TTR("Version Control"), version_control_dock, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_version_control_bottom_panel", TTRC("Toggle Version Control Bottom Panel")));
|
||||
|
||||
|
|
@ -1069,6 +1067,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
|
||||
set_up_ssh_public_key_path = memnew(LineEdit);
|
||||
set_up_ssh_public_key_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_ssh_public_key_path->set_accessibility_name(TTRC("SSH Public Key Path"));
|
||||
set_up_ssh_public_key_path->set_text(EDITOR_GET("version_control/ssh_public_key_path"));
|
||||
set_up_ssh_public_key_path->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
|
||||
set_up_ssh_public_key_input_hbc->add_child(set_up_ssh_public_key_path);
|
||||
|
|
@ -1085,6 +1084,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
select_public_path_button->set_button_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
|
||||
select_public_path_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(set_up_ssh_public_key_file_dialog));
|
||||
select_public_path_button->set_tooltip_text(TTR("Select SSH public key path"));
|
||||
select_public_path_button->set_accessibility_name(TTRC("Select SSH public key path"));
|
||||
set_up_ssh_public_key_input_hbc->add_child(select_public_path_button);
|
||||
|
||||
HBoxContainer *set_up_ssh_private_key_input = memnew(HBoxContainer);
|
||||
|
|
@ -1104,6 +1104,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
set_up_ssh_private_key_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_ssh_private_key_path->set_text(EDITOR_GET("version_control/ssh_private_key_path"));
|
||||
set_up_ssh_private_key_path->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
|
||||
set_up_ssh_private_key_path->set_accessibility_name(TTRC("SSH Private Key Path"));
|
||||
set_up_ssh_private_key_input_hbc->add_child(set_up_ssh_private_key_path);
|
||||
|
||||
set_up_ssh_private_key_file_dialog = memnew(FileDialog);
|
||||
|
|
@ -1118,6 +1119,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
select_private_path_button->set_button_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
|
||||
select_private_path_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(set_up_ssh_private_key_file_dialog));
|
||||
select_private_path_button->set_tooltip_text(TTR("Select SSH private key path"));
|
||||
select_private_path_button->set_accessibility_name(TTRC("Select SSH private key path"));
|
||||
set_up_ssh_private_key_input_hbc->add_child(select_private_path_button);
|
||||
|
||||
HBoxContainer *set_up_ssh_passphrase_input = memnew(HBoxContainer);
|
||||
|
|
@ -1133,6 +1135,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
set_up_ssh_passphrase->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
set_up_ssh_passphrase->set_secret(true);
|
||||
set_up_ssh_passphrase->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_set_up_warning));
|
||||
set_up_ssh_passphrase->set_accessibility_name(TTRC("SSH Passphrase"));
|
||||
set_up_ssh_passphrase_input->add_child(set_up_ssh_passphrase);
|
||||
|
||||
set_up_warning_text = memnew(Label);
|
||||
|
|
@ -1158,6 +1161,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
unstage_title->add_child(unstage_label);
|
||||
|
||||
refresh_button = memnew(Button);
|
||||
refresh_button->set_accessibility_name(TTRC("Detect new changes"));
|
||||
refresh_button->set_tooltip_text(TTR("Detect new changes"));
|
||||
refresh_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
refresh_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||
|
|
@ -1179,6 +1183,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
discard_all_confirm->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_discard_all));
|
||||
|
||||
discard_all_button = memnew(Button);
|
||||
discard_all_button->set_accessibility_name(TTRC("Discard all changes"));
|
||||
discard_all_button->set_tooltip_text(TTR("Discard all changes"));
|
||||
discard_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Close"), EditorStringName(EditorIcons)));
|
||||
discard_all_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_confirm_discard_all));
|
||||
|
|
@ -1186,6 +1191,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
unstage_title->add_child(discard_all_button);
|
||||
|
||||
stage_all_button = memnew(Button);
|
||||
stage_all_button->set_accessibility_name(TTRC("Stage all changes"));
|
||||
stage_all_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
stage_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
|
||||
stage_all_button->set_tooltip_text(TTR("Stage all changes"));
|
||||
|
|
@ -1216,6 +1222,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
stage_title->add_child(stage_label);
|
||||
|
||||
unstage_all_button = memnew(Button);
|
||||
unstage_all_button->set_accessibility_name(TTRC("Unstage all changes"));
|
||||
unstage_all_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
unstage_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
|
||||
unstage_all_button->set_tooltip_text(TTR("Unstage all changes"));
|
||||
|
|
@ -1247,6 +1254,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
commit_area->add_child(commit_label);
|
||||
|
||||
commit_message = memnew(TextEdit);
|
||||
commit_message->set_accessibility_name(TTRC("Commit Message"));
|
||||
commit_message->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
commit_message->set_h_grow_direction(Control::GrowDirection::GROW_DIRECTION_BEGIN);
|
||||
commit_message->set_v_grow_direction(Control::GrowDirection::GROW_DIRECTION_END);
|
||||
|
|
@ -1275,6 +1283,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
commit_list_hbc->add_child(commit_list_label);
|
||||
|
||||
commit_list_size_button = memnew(OptionButton);
|
||||
commit_list_size_button->set_accessibility_name(TTRC("Commit list size"));
|
||||
commit_list_size_button->set_tooltip_text(TTR("Commit list size"));
|
||||
commit_list_size_button->add_item("10");
|
||||
commit_list_size_button->set_item_metadata(0, 10);
|
||||
|
|
@ -1307,6 +1316,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
version_commit_dock->add_child(menu_bar);
|
||||
|
||||
branch_select = memnew(OptionButton);
|
||||
branch_select->set_accessibility_name(TTRC("Branches"));
|
||||
branch_select->set_tooltip_text(TTR("Branches"));
|
||||
branch_select->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
branch_select->set_clip_text(true);
|
||||
|
|
@ -1348,11 +1358,13 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
branch_create_hbc->add_child(branch_create_name_label);
|
||||
|
||||
branch_create_name_input = memnew(LineEdit);
|
||||
branch_create_name_input->set_accessibility_name(TTRC("Branch Name"));
|
||||
branch_create_name_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
branch_create_name_input->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_branch_create_button));
|
||||
branch_create_hbc->add_child(branch_create_name_input);
|
||||
|
||||
remote_select = memnew(OptionButton);
|
||||
remote_select->set_accessibility_name(TTRC("Remote"));
|
||||
remote_select->set_tooltip_text(TTR("Remotes"));
|
||||
remote_select->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_select->set_clip_text(true);
|
||||
|
|
@ -1394,6 +1406,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
remote_create_name_hbc->add_child(remote_create_name_label);
|
||||
|
||||
remote_create_name_input = memnew(LineEdit);
|
||||
remote_create_name_input->set_accessibility_name(TTRC("Remote Name"));
|
||||
remote_create_name_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_create_name_input->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_remote_create_button));
|
||||
remote_create_name_hbc->add_child(remote_create_name_input);
|
||||
|
|
@ -1408,12 +1421,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
remote_create_hbc->add_child(remote_create_url_label);
|
||||
|
||||
remote_create_url_input = memnew(LineEdit);
|
||||
remote_create_url_input->set_accessibility_name(TTRC("Remote URL"));
|
||||
remote_create_url_input->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
remote_create_url_input->connect(SceneStringName(text_changed), callable_mp(this, &VersionControlEditorPlugin::_update_remote_create_button));
|
||||
remote_create_hbc->add_child(remote_create_url_input);
|
||||
|
||||
fetch_button = memnew(Button);
|
||||
fetch_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
fetch_button->set_accessibility_name(TTRC("Fetch"));
|
||||
fetch_button->set_tooltip_text(TTR("Fetch"));
|
||||
fetch_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||
fetch_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_fetch));
|
||||
|
|
@ -1421,6 +1436,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
|
||||
pull_button = memnew(Button);
|
||||
pull_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
pull_button->set_accessibility_name(TTRC("Pull"));
|
||||
pull_button->set_tooltip_text(TTR("Pull"));
|
||||
pull_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
|
||||
pull_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_pull));
|
||||
|
|
@ -1428,6 +1444,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
|
||||
push_button = memnew(Button);
|
||||
push_button->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
push_button->set_accessibility_name(TTRC("Push"));
|
||||
push_button->set_tooltip_text(TTR("Push"));
|
||||
push_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
|
||||
push_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_push));
|
||||
|
|
@ -1494,6 +1511,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
|||
diff_heading->add_child(view);
|
||||
|
||||
diff_view_type_select = memnew(OptionButton);
|
||||
diff_view_type_select->set_accessibility_name(TTRC("View"));
|
||||
diff_view_type_select->add_item(TTR("Split"), DIFF_VIEW_TYPE_SPLIT);
|
||||
diff_view_type_select->add_item(TTR("Unified"), DIFF_VIEW_TYPE_UNIFIED);
|
||||
diff_view_type_select->connect(SceneStringName(item_selected), callable_mp(this, &VersionControlEditorPlugin::_display_diff));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue