diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-07 10:04:40 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-07 10:04:40 +0100 |
commit | 24f775089efd1c3e7419a523dd74dc24924b517c (patch) | |
tree | 9a53089a12867e5e38843ba213163b5c71df1a27 /editor/export/export_template_manager.cpp | |
parent | 1c8d082a3d409cc1f5f6196940bd3e736f5feea6 (diff) | |
parent | 4f52c49006d963415962a9b0613c9f14994cde70 (diff) | |
download | redot-engine-24f775089efd1c3e7419a523dd74dc24924b517c.tar.gz |
Merge pull request #89236 from Calinou/export-template-manager-no-mirrors-development
Don't refresh mirrors for development builds in editor export template manager
Diffstat (limited to 'editor/export/export_template_manager.cpp')
-rw-r--r-- | editor/export/export_template_manager.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp index c3e48820b2..3738521491 100644 --- a/editor/export/export_template_manager.cpp +++ b/editor/export/export_template_manager.cpp @@ -639,7 +639,9 @@ void ExportTemplateManager::_open_template_folder(const String &p_version) { void ExportTemplateManager::popup_manager() { _update_template_status(); - _refresh_mirrors(); + if (downloads_available) { + _refresh_mirrors(); + } popup_centered(Size2(720, 280) * EDSCALE); } @@ -897,7 +899,11 @@ ExportTemplateManager::ExportTemplateManager() { current_missing_label->set_h_size_flags(Control::SIZE_EXPAND_FILL); current_missing_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT); - current_missing_label->set_text(TTR("Export templates are missing. Download them or install from a file.")); + if (downloads_available) { + current_missing_label->set_text(TTR("Export templates are missing. Download them or install from a file.")); + } else { + current_missing_label->set_text(TTR("Export templates are missing. Install them from a file.")); + } current_hb->add_child(current_missing_label); // Status: Current version is installed. @@ -950,8 +956,13 @@ ExportTemplateManager::ExportTemplateManager() { mirrors_list = memnew(OptionButton); mirrors_list->set_custom_minimum_size(Size2(280, 0) * EDSCALE); + if (downloads_available) { + mirrors_list->add_item(TTR("Best available mirror"), 0); + } else { + mirrors_list->add_item(TTR("(no templates for development builds)"), 0); + mirrors_list->set_disabled(true); + } download_install_hb->add_child(mirrors_list); - mirrors_list->add_item(TTR("Best available mirror"), 0); request_mirrors = memnew(HTTPRequest); mirrors_list->add_child(request_mirrors); @@ -960,6 +971,7 @@ ExportTemplateManager::ExportTemplateManager() { mirror_options_button = memnew(MenuButton); mirror_options_button->get_popup()->add_item(TTR("Open in Web Browser"), VISIT_WEB_MIRROR); mirror_options_button->get_popup()->add_item(TTR("Copy Mirror URL"), COPY_MIRROR_URL); + mirror_options_button->set_disabled(!downloads_available); download_install_hb->add_child(mirror_options_button); mirror_options_button->get_popup()->connect("id_pressed", callable_mp(this, &ExportTemplateManager::_mirror_options_button_cbk)); |