diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 06f0472ae70..b9ca95a150a 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -44,7 +44,7 @@ enum class MachineLimitsUsage { }; enum PrintHostType { - htPrusaLink, htPrusaConnect, htOctoPrint, htDuet, htFlashAir, htAstroBox, htRepetier, htMKS, htMainSail + htPrusaLink, htPrusaConnect, htOctoPrint, htMainSail, htDuet, htFlashAir, htAstroBox, htRepetier, htMKS }; enum AuthorizationType { diff --git a/src/slic3r/Utils/OctoPrint.cpp b/src/slic3r/Utils/OctoPrint.cpp index 3fc9ab62e08..d78e6318517 100644 --- a/src/slic3r/Utils/OctoPrint.cpp +++ b/src/slic3r/Utils/OctoPrint.cpp @@ -203,7 +203,7 @@ bool OctoPrint::test_with_resolved_ip(wxString &msg) const const auto text = ptree.get_optional("text"); res = validate_version_text(text); if (!res) { - msg = GUI::format_wxstr(_L("Mismatched type of print host: %s"), (text ? *text : "OctoPrint")); + msg = GUI::format_wxstr(_L("Mismatched type of print host: %s"), (text ? *text : name)); } } catch (const std::exception&) { @@ -252,7 +252,7 @@ bool OctoPrint::test(wxString& msg) const const auto text = ptree.get_optional("text"); res = validate_version_text(text); if (! res) { - msg = GUI::format_wxstr(_L("Mismatched type of print host: %s"), (text ? *text : "OctoPrint")); + msg = GUI::format_wxstr(_L("Mismatched type of print host: %s"), (text ? *text : name)); } } catch (const std::exception &) { @@ -396,7 +396,7 @@ bool OctoPrint::upload_inner_with_resolved_ip(PrintHostUpload upload_data, Progr prorgess_fn(std::move(progress), cancel); if (cancel) { // Upload was canceled - BOOST_LOG_TRIVIAL(info) << "Octoprint: Upload canceled"; + BOOST_LOG_TRIVIAL(info) << name << ": Upload canceled"; result = false; } }) @@ -473,7 +473,7 @@ bool OctoPrint::upload_inner_with_host(PrintHostUpload upload_data, ProgressFn p prorgess_fn(std::move(progress), cancel); if (cancel) { // Upload was canceled - BOOST_LOG_TRIVIAL(info) << "Octoprint: Upload canceled"; + BOOST_LOG_TRIVIAL(info) << name << ": Upload canceled"; res = false; } }) @@ -1127,4 +1127,16 @@ wxString PrusaConnect::get_test_failed_msg(wxString& msg) const return GUI::format_wxstr("%s: %s", _L("Could not connect to Prusa Connect"), msg); } + + +wxString Mainsail::get_test_ok_msg() const +{ + return _(L("Connection to Mainsail/Fluidd works correctly.")); +} + +wxString Mainsail::get_test_failed_msg(wxString& msg) const +{ + return GUI::format_wxstr("%s: %s", _L("Could not connect to MainSail/Fluidd"), msg); +} + } diff --git a/src/slic3r/Utils/OctoPrint.hpp b/src/slic3r/Utils/OctoPrint.hpp index 2daeab73f0c..d12e28a5bde 100644 --- a/src/slic3r/Utils/OctoPrint.hpp +++ b/src/slic3r/Utils/OctoPrint.hpp @@ -125,6 +125,8 @@ class Mainsail : public OctoPrint ~Mainsail() override = default; const char* get_name() const override { return "Mainsail/Fluidd"; } + wxString get_test_ok_msg() const override; + wxString get_test_failed_msg(wxString& msg) const override; }; class SL1Host : public PrusaLink