diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-19 16:27:19 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-20 08:24:50 +0100 |
commit | 69c95f4b4c128a22777af1e155bc24c7033decca (patch) | |
tree | 0add52fc270f808b4b2ad0bf7c970d72338c667e /editor/plugins/version_control_editor_plugin.cpp | |
parent | 1a4be2cd8fdd9ba26f016f3e2d83febfe8ae141c (diff) |
Reworked signal connection system, added support for Callable and Signal objects and made them default.
Diffstat (limited to 'editor/plugins/version_control_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index e17e6a9d16..cfa10488ab 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -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); |