check for new version rework, support "check for stable updates only" mode

This commit is contained in:
SoftFever 2023-12-29 12:04:40 +08:00
parent f89932f63e
commit 63f9b3b1ba
6 changed files with 98 additions and 76 deletions

View file

@ -996,6 +996,7 @@ wxWindow* PreferencesDialog::create_general_page()
auto item_region= create_item_region_combobox(_L("Login Region"), page, _L("Login Region"), Regions);
auto item_stealth_mode = create_item_checkbox(_L("Stealth Mode"), page, _L("Stealth Mode"), 50, "stealth_mode");
auto item_check_stable_version_only = create_item_checkbox(_L("Check for stable updates only"), page, _L("Check for stable updates only"), 50, "check_stable_update_only");
std::vector<wxString> Units = {_L("Metric") + " (mm, g)", _L("Imperial") + " (in, oz)"};
auto item_currency = create_item_combobox(_L("Units"), page, _L("Units"), "use_inches", Units);
@ -1072,6 +1073,7 @@ wxWindow* PreferencesDialog::create_general_page()
sizer_page->Add(item_hints, 0, wxTOP, FromDIP(3));
sizer_page->Add(title_presets, 0, wxTOP | wxEXPAND, FromDIP(20));
sizer_page->Add(item_stealth_mode, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_check_stable_version_only, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_calc_mode, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_user_sync, 0, wxTOP, FromDIP(3));
sizer_page->Add(item_system_sync, 0, wxTOP, FromDIP(3));