feature add tips dialog for no update on preset

This commit is contained in:
alves
2025-12-31 16:18:55 +08:00
parent 6c20bc3b31
commit d82cca2f50
5 changed files with 55 additions and 15 deletions

View File

@@ -2578,6 +2578,12 @@ bool GUI_App::on_init_inner()
});
dlg.ShowModal();
});
Bind(EVT_NO_PRESET_UPDATE, [this](const wxCommandEvent& evt) {
wxString msg = _L("This is the newest version.");
InfoDialog dlg(nullptr, _L("Info"), msg);
dlg.ShowModal();
});
}
else {
#ifdef __WXMSW__
@@ -4716,12 +4722,10 @@ void maybe_attach_updater_signature(Http& http, const std::string& canonical_que
} // namespace
bool GUI_App::check_preset_version()
{
bool is_newest_version = false;
return is_newest_version;
void GUI_App::check_preset_version()
{
if (preset_updater != nullptr)
preset_updater->sync_config_async();
}
void GUI_App::check_new_version_sf(bool show_tips, bool by_user)
{

View File

@@ -578,7 +578,7 @@ private:
bool m_studio_active = true;
std::chrono::system_clock::time_point last_active_point;
bool check_preset_version();
void check_preset_version();
void check_new_version_sf(bool show_tips = false, bool by_user = false);
void process_network_msg(std::string dev_id, std::string msg);
void enter_force_upgrade();

View File

@@ -2300,10 +2300,8 @@ static wxMenu* generate_help_menu()
append_menu_item(
helpMenu, wxID_ANY, _L("Check for Preset Update"), _L("Check for Preset Update"),
[](wxCommandEvent&) {
wxGetApp().check_preset_version();
wxString msg = _L("This is the newest version.");
InfoDialog dlg(nullptr, _L("Info"), msg);
dlg.ShowModal();
},
"", nullptr, []() { return true; });