Merge pull request #111012 from KoBeWi/activate_never

Delete "Activate now?" button
This commit is contained in:
Thaddeus Crews 2025-10-09 11:46:45 -05:00
commit 755934f5f0
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
2 changed files with 0 additions and 24 deletions

View file

@ -98,7 +98,6 @@ void PluginConfigDialog::_create_script_for_plugin(const String &p_plugin_path,
scr->set_path(script_path, true); scr->set_path(script_path, true);
ResourceSaver::save(scr); ResourceSaver::save(scr);
p_config_file->save(p_plugin_path.path_join("plugin.cfg")); p_config_file->save(p_plugin_path.path_join("plugin.cfg"));
emit_signal(SNAME("plugin_ready"), scr.ptr(), active_edit->is_pressed() ? _to_absolute_plugin_path(_get_subfolder()) : "");
} }
} }
@ -132,15 +131,6 @@ void PluginConfigDialog::_on_required_text_changed() {
if ((!script_edit->get_text().get_extension().is_empty() && script_edit->get_text().get_extension() != ext) || script_edit->get_text().ends_with(".")) { if ((!script_edit->get_text().get_extension().is_empty() && script_edit->get_text().get_extension() != ext) || script_edit->get_text().ends_with(".")) {
validation_panel->set_message(MSG_ID_SCRIPT, vformat(TTR("Script extension must match chosen language extension (.%s)."), ext), EditorValidationPanel::MSG_ERROR); validation_panel->set_message(MSG_ID_SCRIPT, vformat(TTR("Script extension must match chosen language extension (.%s)."), ext), EditorValidationPanel::MSG_ERROR);
} }
if (active_edit->is_visible()) {
if (language->get_name() == "C#") {
active_edit->set_pressed(false);
active_edit->set_disabled(true);
validation_panel->set_message(MSG_ID_ACTIVE, TTR("C# doesn't support activating the plugin on creation because the project must be built first."), EditorValidationPanel::MSG_WARNING);
} else {
active_edit->set_disabled(false);
}
}
} }
String PluginConfigDialog::_get_subfolder() { String PluginConfigDialog::_get_subfolder() {
@ -317,19 +307,6 @@ PluginConfigDialog::PluginConfigDialog() {
script_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL); script_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
grid->add_child(script_edit); grid->add_child(script_edit);
// Activate now checkbox
Label *active_label = memnew(Label);
active_label->set_text(TTR("Activate now?"));
active_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
grid->add_child(active_label);
plugin_edit_hidden_controls.push_back(active_label);
active_edit = memnew(CheckBox);
active_edit->set_pressed(true);
active_edit->set_accessibility_name(TTRC("Activate now?"));
grid->add_child(active_edit);
plugin_edit_hidden_controls.push_back(active_edit);
Control *spacing = memnew(Control); Control *spacing = memnew(Control);
vbox->add_child(spacing); vbox->add_child(spacing);
spacing->set_custom_minimum_size(Size2(0, 10 * EDSCALE)); spacing->set_custom_minimum_size(Size2(0, 10 * EDSCALE));

View file

@ -56,7 +56,6 @@ class PluginConfigDialog : public ConfirmationDialog {
LineEdit *version_edit = nullptr; LineEdit *version_edit = nullptr;
OptionButton *script_option_edit = nullptr; OptionButton *script_option_edit = nullptr;
LineEdit *script_edit = nullptr; LineEdit *script_edit = nullptr;
CheckBox *active_edit = nullptr;
LocalVector<Control *> plugin_edit_hidden_controls; LocalVector<Control *> plugin_edit_hidden_controls;