mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
ENH:optimized the retry of requests
jira:[for network optimized] Change-Id: Iea43f4a97c7cd568171287278a07689e954d1093 (cherry picked from commit 35d3de8abe63a0cba30948581ed26a8bc7f94162) (cherry picked from commit 30bad38fb979f5c5a10e4b869ec2e41fa99857f8)
This commit is contained in:
parent
569d4e6307
commit
8bb7ea7cfc
7 changed files with 156 additions and 2 deletions
|
@ -1571,6 +1571,17 @@ void GUI_App::init_networking_callbacks()
|
|||
// GUI::wxGetApp().request_user_handle(online_login);
|
||||
// });
|
||||
|
||||
m_agent->set_server_callback([this](std::string url, int status) {
|
||||
if (!m_server_error_dialog) {
|
||||
m_server_error_dialog = new NetworkErrorDialog(mainframe);
|
||||
}
|
||||
|
||||
if (!m_server_error_dialog->IsShown()) {
|
||||
m_server_error_dialog->ShowModal();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
m_agent->set_on_server_connected_fn([this](int return_code, int reason_code) {
|
||||
if (m_is_closing) {
|
||||
return;
|
||||
|
@ -3227,6 +3238,23 @@ void GUI_App::link_to_network_check()
|
|||
wxLaunchDefaultBrowser(url);
|
||||
}
|
||||
|
||||
void GUI_App::link_to_lan_only_wiki()
|
||||
{
|
||||
std::string url;
|
||||
std::string country_code = app_config->get_country_code();
|
||||
|
||||
if (country_code == "US") {
|
||||
url = "https://wiki.bambulab.com/en/knowledge-sharing/enable-lan-mode";
|
||||
}
|
||||
else if (country_code == "CN") {
|
||||
url = "https://wiki.bambulab.com/zh/knowledge-sharing/enable-lan-mode";
|
||||
}
|
||||
else {
|
||||
url = "https://wiki.bambulab.com/en/knowledge-sharing/enable-lan-mode";
|
||||
}
|
||||
wxLaunchDefaultBrowser(url);
|
||||
}
|
||||
|
||||
bool GUI_App::tabs_as_menu() const
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue