From ccad84fb42fe79cfa2fb18c11988c3b709ae37e1 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Sat, 12 Dec 2020 11:26:17 +0100 Subject: [PATCH] Follow-up on 3523bb421f17b6ac3b0587b9b206bfce7d006754 (Ongoing uploads while exiting dialog): Fixed some string conversion issues. --- src/slic3r/GUI/GUI_App.cpp | 3 ++- src/slic3r/GUI/PrintHostDialogs.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 7d276700f..57c76a757 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -3,6 +3,7 @@ #include "GUI_Init.hpp" #include "GUI_ObjectList.hpp" #include "GUI_ObjectManipulation.hpp" +#include "format.hpp" #include "I18N.hpp" #include @@ -1719,7 +1720,7 @@ bool GUI_App::check_print_host_queue() // Show dialog wxString job_string = wxString(); for (const auto& job : jobs) { - job_string += (boost::format(" %1% : %2% \n") % job.first % job.second).str(); + job_string += format_wxstr(" %1% : %2% \n", job.first, job.second); } wxString message; message += _(L("The uploads are still ongoing")) + ":\n\n" + job_string +"\n" + _(L("Stop them and continue anyway?")); diff --git a/src/slic3r/GUI/PrintHostDialogs.cpp b/src/slic3r/GUI/PrintHostDialogs.cpp index ef072397b..a9343767f 100644 --- a/src/slic3r/GUI/PrintHostDialogs.cpp +++ b/src/slic3r/GUI/PrintHostDialogs.cpp @@ -230,6 +230,7 @@ void PrintHostQueueDialog::append_job(const PrintHostJob &job) fields.push_back(wxVariant(job.upload_data.upload_path.string())); fields.push_back(wxVariant("")); job_list->AppendItem(fields, static_cast(ST_NEW)); + // Both strings are UTF-8 encoded. upload_names.emplace_back(job.printhost->get_host(), job.upload_data.upload_path.string()); }