Skip to content

Commit 5df4a0a

Browse files
committed
Merge pull request #105291 from jaydensipe/rename-editor-setting-check-for-update
Rename editor setting `Engine Version Update Mode` to `Check for Updates`
2 parents 20b2674 + 5f7e9a9 commit 5df4a0a

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

doc/classes/EditorSettings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@
11171117
Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices.
11181118
[b]Note:[/b] Defaults to [code]1[/code] on non-touchscreen devices.
11191119
</member>
1120-
<member name="network/connection/engine_version_update_mode" type="int" setter="" getter="">
1120+
<member name="network/connection/check_for_updates" type="int" setter="" getter="">
11211121
Specifies how the engine should check for updates.
11221122
- [b]Disable Update Checks[/b] will block the engine from checking updates (see also [member network/connection/network_mode]).
11231123
- [b]Check Newest Preview[/b] (default for preview versions) will check for the newest available development snapshot.

editor/editor_settings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
473473
if (String(GODOT_VERSION_STATUS) == String("stable")) {
474474
default_update_mode = EngineUpdateLabel::UpdateMode::NEWEST_STABLE;
475475
}
476-
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "network/connection/engine_version_update_mode", int(default_update_mode), "Disable Update Checks,Check Newest Preview,Check Newest Stable,Check Newest Patch"); // Uses EngineUpdateLabel::UpdateMode.
476+
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "network/connection/check_for_updates", int(default_update_mode), "Disable Update Checks,Check Newest Preview,Check Newest Stable,Check Newest Patch"); // Uses EngineUpdateLabel::UpdateMode.
477477
}
478478

479479
EDITOR_SETTING_USAGE(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/use_embedded_menu", false, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED | PROPERTY_USAGE_EDITOR_BASIC_SETTING)

editor/engine_update_label.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
bool EngineUpdateLabel::_can_check_updates() const {
3939
return int(EDITOR_GET("network/connection/network_mode")) == EditorSettings::NETWORK_ONLINE &&
40-
UpdateMode(int(EDITOR_GET("network/connection/engine_version_update_mode"))) != UpdateMode::DISABLED;
40+
UpdateMode(int(EDITOR_GET("network/connection/check_for_updates"))) != UpdateMode::DISABLED;
4141
}
4242

4343
void EngineUpdateLabel::_check_update() {
@@ -78,7 +78,7 @@ void EngineUpdateLabel::_http_request_completed(int p_result, int p_response_cod
7878
version_array = result;
7979
}
8080

81-
UpdateMode update_mode = UpdateMode(int(EDITOR_GET("network/connection/engine_version_update_mode")));
81+
UpdateMode update_mode = UpdateMode(int(EDITOR_GET("network/connection/check_for_updates")));
8282
bool stable_only = update_mode == UpdateMode::NEWEST_STABLE || update_mode == UpdateMode::NEWEST_PATCH;
8383

8484
const Dictionary current_version_info = Engine::get_singleton()->get_version_info();

editor/project_manager/quick_settings_dialog.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void QuickSettingsDialog::_fetch_setting_values() {
4848
editor_themes.clear();
4949
editor_scales.clear();
5050
editor_network_modes.clear();
51-
editor_engine_version_update_modes.clear();
51+
editor_check_for_updates.clear();
5252
editor_directory_naming_conventions.clear();
5353

5454
{
@@ -66,8 +66,8 @@ void QuickSettingsDialog::_fetch_setting_values() {
6666
editor_scales = pi.hint_string.split(",");
6767
} else if (pi.name == "network/connection/network_mode") {
6868
editor_network_modes = pi.hint_string.split(",");
69-
} else if (pi.name == "network/connection/engine_version_update_mode") {
70-
editor_engine_version_update_modes = pi.hint_string.split(",");
69+
} else if (pi.name == "network/connection/check_for_updates") {
70+
editor_check_for_updates = pi.hint_string.split(",");
7171
} else if (pi.name == "project_manager/directory_naming_convention") {
7272
editor_directory_naming_conventions = pi.hint_string.split(",");
7373
}
@@ -133,18 +133,18 @@ void QuickSettingsDialog::_update_current_values() {
133133
}
134134
}
135135

136-
// Engine version update mode options.
136+
// Check for updates options.
137137
{
138-
const int current_update_mode = EDITOR_GET("network/connection/engine_version_update_mode");
138+
const int current_update_mode = EDITOR_GET("network/connection/check_for_updates");
139139

140-
for (int i = 0; i < editor_engine_version_update_modes.size(); i++) {
141-
const String &engine_version_update_mode_value = editor_engine_version_update_modes[i];
140+
for (int i = 0; i < editor_check_for_updates.size(); i++) {
141+
const String &check_for_update_value = editor_check_for_updates[i];
142142
if (current_update_mode == i) {
143-
engine_version_update_mode_button->set_text(engine_version_update_mode_value);
144-
engine_version_update_mode_button->select(i);
143+
check_for_update_button->set_text(check_for_update_value);
144+
check_for_update_button->select(i);
145145

146-
// Disables Engine Version Update Mode selection if Network mode is set to Offline.
147-
engine_version_update_mode_button->set_disabled(!EDITOR_GET("network/connection/network_mode"));
146+
// Disables Check for Updates selection if Network mode is set to Offline.
147+
check_for_update_button->set_disabled(!EDITOR_GET("network/connection/network_mode"));
148148
}
149149
}
150150
}
@@ -197,12 +197,12 @@ void QuickSettingsDialog::_scale_selected(int p_id) {
197197
void QuickSettingsDialog::_network_mode_selected(int p_id) {
198198
_set_setting_value("network/connection/network_mode", p_id);
199199

200-
// Disables Engine Version Update Mode selection if Network mode is set to Offline.
201-
engine_version_update_mode_button->set_disabled(!p_id);
200+
// Disables Check for Updates selection if Network mode is set to Offline.
201+
check_for_update_button->set_disabled(!p_id);
202202
}
203203

204-
void QuickSettingsDialog::_engine_version_update_mode_selected(int p_id) {
205-
_set_setting_value("network/connection/engine_version_update_mode", p_id);
204+
void QuickSettingsDialog::_check_for_update_selected(int p_id) {
205+
_set_setting_value("network/connection/check_for_updates", p_id);
206206
}
207207

208208
void QuickSettingsDialog::_directory_naming_convention_selected(int p_id) {
@@ -346,18 +346,18 @@ QuickSettingsDialog::QuickSettingsDialog() {
346346
_add_setting_control(TTRC("Network Mode"), network_mode_option_button);
347347
}
348348

349-
// Engine version update mode options.
349+
// Check for updates options.
350350
{
351-
engine_version_update_mode_button = memnew(OptionButton);
352-
engine_version_update_mode_button->set_fit_to_longest_item(false);
353-
engine_version_update_mode_button->connect(SceneStringName(item_selected), callable_mp(this, &QuickSettingsDialog::_engine_version_update_mode_selected));
351+
check_for_update_button = memnew(OptionButton);
352+
check_for_update_button->set_fit_to_longest_item(false);
353+
check_for_update_button->connect(SceneStringName(item_selected), callable_mp(this, &QuickSettingsDialog::_check_for_update_selected));
354354

355-
for (int i = 0; i < editor_engine_version_update_modes.size(); i++) {
356-
const String &engine_version_update_mode_value = editor_engine_version_update_modes[i];
357-
engine_version_update_mode_button->add_item(engine_version_update_mode_value, i);
355+
for (int i = 0; i < editor_check_for_updates.size(); i++) {
356+
const String &check_for_update_value = editor_check_for_updates[i];
357+
check_for_update_button->add_item(check_for_update_value, i);
358358
}
359359

360-
_add_setting_control(TTRC("Engine Version Update Mode"), engine_version_update_mode_button);
360+
_add_setting_control(TTRC("Check for Updates"), check_for_update_button);
361361
}
362362

363363
// Project directory naming options.

editor/project_manager/quick_settings_dialog.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class QuickSettingsDialog : public AcceptDialog {
4848
Vector<String> editor_themes;
4949
Vector<String> editor_scales;
5050
Vector<String> editor_network_modes;
51-
Vector<String> editor_engine_version_update_modes;
51+
Vector<String> editor_check_for_updates;
5252
Vector<String> editor_directory_naming_conventions;
5353

5454
void _fetch_setting_values();
@@ -67,7 +67,7 @@ class QuickSettingsDialog : public AcceptDialog {
6767
OptionButton *theme_option_button = nullptr;
6868
OptionButton *scale_option_button = nullptr;
6969
OptionButton *network_mode_option_button = nullptr;
70-
OptionButton *engine_version_update_mode_button = nullptr;
70+
OptionButton *check_for_update_button = nullptr;
7171
OptionButton *directory_naming_convention_button = nullptr;
7272

7373
Label *custom_theme_label = nullptr;
@@ -78,7 +78,7 @@ class QuickSettingsDialog : public AcceptDialog {
7878
void _theme_selected(int p_id);
7979
void _scale_selected(int p_id);
8080
void _network_mode_selected(int p_id);
81-
void _engine_version_update_mode_selected(int p_id);
81+
void _check_for_update_selected(int p_id);
8282
void _directory_naming_convention_selected(int p_id);
8383
void _set_setting_value(const String &p_setting, const Variant &p_value, bool p_restart_required = false);
8484

0 commit comments

Comments
 (0)