Skip to content

Commit f6da686

Browse files
committed
feat: add 'Don't show this warning again' to cloud connection failure dialog
The "Failed to connect to the cloud device server" dialog previously reappeared every time the MQTT connection failed, which was disruptive for users on LAN-only or offline setups. Replace MessageDialog with RichMessageDialog and add a "Don't show this warning again" checkbox. When checked, the config key suppress_cloud_warnings is set to "1" and the dialog is permanently suppressed for future sessions. Closes #10589
1 parent e150b50 commit f6da686

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/slic3r/GUI/GUI_App.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2061,10 +2061,14 @@ void GUI_App::init_networking_callbacks()
20612061
GUI::wxGetApp().CallAfter([this] {
20622062
static bool is_showing = false;
20632063
if (is_showing) return;
2064+
if (app_config && app_config->get("suppress_cloud_warnings") == "1") return;
20642065
is_showing = true;
20652066
BOOST_LOG_TRIVIAL(trace) << "static: server connection failed";
2066-
MessageDialog msg_dlg(nullptr, _L("Failed to connect to the cloud device server. Please check your network and firewall."), "", wxOK);
2067+
RichMessageDialog msg_dlg(nullptr, _L("Failed to connect to the cloud device server. Please check your network and firewall."), "", wxOK);
2068+
msg_dlg.ShowCheckBox(_L("Don't show this warning again"));
20672069
msg_dlg.ShowModal();
2070+
if (msg_dlg.IsCheckBoxChecked() && app_config)
2071+
app_config->set("suppress_cloud_warnings", "1");
20682072
is_showing = false;
20692073
});
20702074
return;

0 commit comments

Comments
 (0)