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
|
|
@ -61,9 +61,8 @@ void EngineUpdateLabel::_http_request_completed(int p_result, int p_response_cod
|
|||
|
||||
Array version_array;
|
||||
{
|
||||
String s;
|
||||
const uint8_t *r = p_body.ptr();
|
||||
s.parse_utf8((const char *)r, p_body.size());
|
||||
String s = String::utf8((const char *)r, p_body.size());
|
||||
|
||||
Variant result = JSON::parse_string(s);
|
||||
if (result == Variant()) {
|
||||
|
|
@ -185,17 +184,20 @@ void EngineUpdateLabel::_set_status(UpdateStatus p_status) {
|
|||
} else {
|
||||
_set_message(TTR("Update checks disabled."), theme_cache.disabled_color);
|
||||
}
|
||||
set_accessibility_live(DisplayServer::AccessibilityLiveMode::LIVE_OFF);
|
||||
set_tooltip_text("");
|
||||
break;
|
||||
}
|
||||
|
||||
case UpdateStatus::ERROR: {
|
||||
set_disabled(false);
|
||||
set_accessibility_live(DisplayServer::AccessibilityLiveMode::LIVE_POLITE);
|
||||
set_tooltip_text(TTR("An error has occurred. Click to try again."));
|
||||
} break;
|
||||
|
||||
case UpdateStatus::UPDATE_AVAILABLE: {
|
||||
set_disabled(false);
|
||||
set_accessibility_live(DisplayServer::AccessibilityLiveMode::LIVE_POLITE);
|
||||
set_tooltip_text(TTR("Click to open download page."));
|
||||
} break;
|
||||
|
||||
|
|
@ -248,12 +250,7 @@ void EngineUpdateLabel::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (_can_check_updates()) {
|
||||
if (!checked_update) {
|
||||
_check_update();
|
||||
} else {
|
||||
// This will be wrong when user toggles online mode twice when update is available, but it's not worth handling.
|
||||
_set_status(UpdateStatus::UP_TO_DATE);
|
||||
}
|
||||
_check_update();
|
||||
} else {
|
||||
_set_status(UpdateStatus::OFFLINE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue