mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-18 16:32:06 +00:00
Merge branch 'main' into pr/grant0013/13752
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "MsgDialog.hpp"
|
||||
#include "OAuthDialog.hpp"
|
||||
#include "SimplyPrint.hpp"
|
||||
#include "3DPrinterOS.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
@@ -292,6 +293,12 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
|
||||
} else {
|
||||
msg = r.error_message;
|
||||
}
|
||||
} else if (const auto h = dynamic_cast<C3DPrinterOS*>(host.get()); h) {
|
||||
GUI::MessageDialog dlg(this, _L("Valid session not detected. Proceed with login to 3DPrinterOS?"), _L("Proceed"),
|
||||
wxICON_INFORMATION | wxYES | wxNO);
|
||||
if (dlg.ShowModal() == wxID_YES) {
|
||||
result = h->login(msg);
|
||||
}
|
||||
} else {
|
||||
PrinterCloudAuthDialog dlg(this->GetParent(), host.get());
|
||||
dlg.ShowModal();
|
||||
@@ -663,7 +670,8 @@ void PhysicalPrinterDialog::update(bool printer_change)
|
||||
const auto current_host = temp->GetValue();
|
||||
if (current_host == L"https://connect.prusa3d.com" ||
|
||||
current_host == L"https://app.obico.io" ||
|
||||
current_host == "https://simplyprint.io" || current_host == "https://simplyprint.io/panel") {
|
||||
current_host == "https://simplyprint.io" || current_host == "https://simplyprint.io/panel" ||
|
||||
current_host == C3DPrinterOS::default_host()) {
|
||||
temp->SetValue(wxString());
|
||||
m_config->opt_string("print_host") = "";
|
||||
}
|
||||
@@ -696,7 +704,7 @@ void PhysicalPrinterDialog::update(bool printer_change)
|
||||
m_config->opt_string("print_host") = "https://app.obico.io";
|
||||
}
|
||||
}
|
||||
} else if (opt->value == htSimplyPrint) {
|
||||
} else if (opt->value == htSimplyPrint) {
|
||||
// Set the host url
|
||||
if (Field* printhost_field = m_optgroup->get_field("print_host"); printhost_field) {
|
||||
printhost_field->disable();
|
||||
@@ -733,7 +741,16 @@ void PhysicalPrinterDialog::update(bool printer_change)
|
||||
m_optgroup->disable_field("printhost_ssl_ignore_revoke");
|
||||
if (m_printhost_cafile_browse_btn)
|
||||
m_printhost_cafile_browse_btn->Disable();
|
||||
}
|
||||
} else if (opt->value == ht3DPrinterOS) {
|
||||
if (Field* printhost_field = m_optgroup->get_field("print_host"); printhost_field) {
|
||||
if (wxTextCtrl* temp = dynamic_cast<TextCtrl*>(printhost_field)->text_ctrl(); temp && temp->GetValue().IsEmpty()) {
|
||||
temp->SetValue(C3DPrinterOS::default_host());
|
||||
m_config->opt_string("print_host") = C3DPrinterOS::default_host();
|
||||
}
|
||||
}
|
||||
m_optgroup->hide_field("print_host_webui");
|
||||
m_optgroup->hide_field("printhost_apikey");
|
||||
}
|
||||
}
|
||||
|
||||
if (opt->value == htFlashforge) {
|
||||
|
||||
Reference in New Issue
Block a user