You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Reworked signal connection system, added support for Callable and Signal objects and made them default.
This commit is contained in:
committed by
Juan Linietsky
parent
1a4be2cd8f
commit
69c95f4b4c
@@ -127,7 +127,7 @@ void VersionControlEditorPlugin::_initialize_vcs() {
|
||||
vcs_interface->set_script_and_instance(script, addon_script_instance);
|
||||
|
||||
EditorVCSInterface::set_singleton(vcs_interface);
|
||||
EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_refresh_stage_area");
|
||||
EditorFileSystem::get_singleton()->connect_compat("filesystem_changed", this, "_refresh_stage_area");
|
||||
|
||||
String res_dir = OS::get_singleton()->get_resource_dir();
|
||||
|
||||
@@ -388,8 +388,8 @@ void VersionControlEditorPlugin::clear_stage_area() {
|
||||
void VersionControlEditorPlugin::shut_down() {
|
||||
|
||||
if (EditorVCSInterface::get_singleton()) {
|
||||
if (EditorFileSystem::get_singleton()->is_connected("filesystem_changed", this, "_refresh_stage_area")) {
|
||||
EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "_refresh_stage_area");
|
||||
if (EditorFileSystem::get_singleton()->is_connected_compat("filesystem_changed", this, "_refresh_stage_area")) {
|
||||
EditorFileSystem::get_singleton()->disconnect_compat("filesystem_changed", this, "_refresh_stage_area");
|
||||
}
|
||||
EditorVCSInterface::get_singleton()->shut_down();
|
||||
memdelete(EditorVCSInterface::get_singleton());
|
||||
@@ -444,14 +444,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
|
||||
set_up_choice = memnew(OptionButton);
|
||||
set_up_choice->set_h_size_flags(HBoxContainer::SIZE_EXPAND_FILL);
|
||||
set_up_choice->connect("item_selected", this, "_selected_a_vcs");
|
||||
set_up_choice->connect_compat("item_selected", this, "_selected_a_vcs");
|
||||
set_up_hbc->add_child(set_up_choice);
|
||||
|
||||
set_up_init_settings = NULL;
|
||||
|
||||
set_up_init_button = memnew(Button);
|
||||
set_up_init_button->set_text(TTR("Initialize"));
|
||||
set_up_init_button->connect("pressed", this, "_initialize_vcs");
|
||||
set_up_init_button->connect_compat("pressed", this, "_initialize_vcs");
|
||||
set_up_vbc->add_child(set_up_init_button);
|
||||
|
||||
version_control_actions->set_v_size_flags(PopupMenu::SIZE_EXPAND_FILL);
|
||||
@@ -479,7 +479,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
refresh_button->set_tooltip(TTR("Detect new changes"));
|
||||
refresh_button->set_text(TTR("Refresh"));
|
||||
refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons"));
|
||||
refresh_button->connect("pressed", this, "_refresh_stage_area");
|
||||
refresh_button->connect_compat("pressed", this, "_refresh_stage_area");
|
||||
stage_tools->add_child(refresh_button);
|
||||
|
||||
stage_files = memnew(Tree);
|
||||
@@ -492,7 +492,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
stage_files->set_allow_rmb_select(true);
|
||||
stage_files->set_select_mode(Tree::SelectMode::SELECT_MULTI);
|
||||
stage_files->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);
|
||||
stage_files->connect("cell_selected", this, "_view_file_diff");
|
||||
stage_files->connect_compat("cell_selected", this, "_view_file_diff");
|
||||
stage_files->create_item();
|
||||
stage_files->set_hide_root(true);
|
||||
commit_box_vbc->add_child(stage_files);
|
||||
@@ -516,12 +516,12 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
stage_selected_button = memnew(Button);
|
||||
stage_selected_button->set_h_size_flags(Button::SIZE_EXPAND_FILL);
|
||||
stage_selected_button->set_text(TTR("Stage Selected"));
|
||||
stage_selected_button->connect("pressed", this, "_stage_selected");
|
||||
stage_selected_button->connect_compat("pressed", this, "_stage_selected");
|
||||
stage_buttons->add_child(stage_selected_button);
|
||||
|
||||
stage_all_button = memnew(Button);
|
||||
stage_all_button->set_text(TTR("Stage All"));
|
||||
stage_all_button->connect("pressed", this, "_stage_all");
|
||||
stage_all_button->connect_compat("pressed", this, "_stage_all");
|
||||
stage_buttons->add_child(stage_all_button);
|
||||
|
||||
commit_box_vbc->add_child(memnew(HSeparator));
|
||||
@@ -537,7 +537,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
|
||||
commit_button = memnew(Button);
|
||||
commit_button->set_text(TTR("Commit Changes"));
|
||||
commit_button->connect("pressed", this, "_send_commit_msg");
|
||||
commit_button->connect_compat("pressed", this, "_send_commit_msg");
|
||||
commit_box_vbc->add_child(commit_button);
|
||||
|
||||
commit_status = memnew(Label);
|
||||
@@ -571,7 +571,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
|
||||
diff_refresh_button = memnew(Button);
|
||||
diff_refresh_button->set_tooltip(TTR("Detect changes in file diff"));
|
||||
diff_refresh_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Reload", "EditorIcons"));
|
||||
diff_refresh_button->connect("pressed", this, "_refresh_file_diff");
|
||||
diff_refresh_button->connect_compat("pressed", this, "_refresh_file_diff");
|
||||
diff_hbc->add_child(diff_refresh_button);
|
||||
|
||||
diff = memnew(RichTextLabel);
|
||||
|
||||
Reference in New Issue
Block a user