From 5f0945772cce707f3cfc068902338396289915e5 Mon Sep 17 00:00:00 2001 From: Stone Li Date: Thu, 16 Jan 2025 15:44:45 +0800 Subject: [PATCH] ENH: add studio unsigned msg dialog JIRA: no-jira Change-Id: I3a4cd03a58d52a725fc5b29c8da7c6d74a00b227 Signed-off-by: Stone Li --- src/slic3r/GUI/GUI_App.cpp | 7 +++++++ src/slic3r/GUI/Jobs/PrintJob.cpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 568869668..04c19afb4 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4898,6 +4898,13 @@ void GUI_App::process_network_msg(std::string dev_id, std::string msg) m_show_error_msgdlg = false; } } + else if (msg == "unsigned_studio") { + BOOST_LOG_TRIVIAL(info) << "process_network_msg, unsigned_studio"; + MessageDialog msg_dlg(nullptr, _L("Your software is not signed, and some printing functions have been restricted. Please use the officially signed software version."), "", wxAPPLY | wxOK); + m_show_error_msgdlg = true; + auto modal_result = msg_dlg.ShowModal(); + m_show_error_msgdlg = false; + } } } diff --git a/src/slic3r/GUI/Jobs/PrintJob.cpp b/src/slic3r/GUI/Jobs/PrintJob.cpp index e6771685a..40f5e1d5e 100644 --- a/src/slic3r/GUI/Jobs/PrintJob.cpp +++ b/src/slic3r/GUI/Jobs/PrintJob.cpp @@ -21,6 +21,7 @@ static wxString file_over_size_str = _L("The print file exceeds the max static wxString print_canceled_str = _L("Task canceled."); static wxString send_print_failed_str = _L("Failed to send the print job. Please try again."); static wxString upload_ftp_failed_str = _L("Failed to upload file to ftp. Please try again."); +static wxString print_signed_str = _L("Your software is not signed, and some printing functions have been restricted. Please use the officially signed software version."); static wxString desc_network_error = _L("Check the current status of the bambu server by clicking on the link above."); static wxString desc_file_too_large = _L("The size of the print file is too large. Please adjust the file size and try again."); @@ -609,6 +610,8 @@ void PrintJob::process() } else if (result == BAMBU_NETWORK_ERR_CANCELED) { msg_text = print_canceled_str; this->update_status(0, msg_text); + } else if (result == BAMBU_NETWORK_SIGNED_ERROR) { + msg_text = print_signed_str; } else { msg_text = send_print_failed_str; }