FIX: refine Warning dialog

Change-Id: I8169dd8bce0013a1acacd837871af2051f5cc3a5
This commit is contained in:
tao.jin
2022-11-14 15:13:26 +08:00
committed by Lane.Wei
parent 70cf94e494
commit 5b63235f89
9 changed files with 30 additions and 318 deletions

View File

@@ -797,8 +797,8 @@ void UpgradePanel::update(MachineObject *obj)
if (m_obj && m_show_forced_hint) {
if (m_obj->upgrade_force_upgrade) {
m_show_forced_hint = false; //lock hint
SecondaryCheckDialog* force_dlg = new SecondaryCheckDialog(m_scrolledWindow, wxID_ANY, _L("Update firmware"));
force_dlg->update_text(_L(
SecondaryCheckDialog force_dlg(this->GetParent(), wxID_ANY, _L("Update firmware"), SecondaryCheckDialog::ButtonStyle::CONFIRM_AND_CANCEL, wxDefaultPosition, wxDefaultSize, wxPD_APP_MODAL | wxCLOSE_BOX | wxCAPTION);
force_dlg.update_text(_L(
"An important update was detected and needs to be run before printing can continue. Do you want to update now? You can also update later from 'Upgrade firmware'."
));
force_dlg->Bind(EVT_SECONDARY_CHECK_CONFIRM, &MachineInfoPanel::on_upgrade_firmware, m_push_upgrade_panel);
@@ -816,8 +816,8 @@ void UpgradePanel::update(MachineObject *obj)
if (m_obj && m_show_consistency_hint) {
if (m_obj->upgrade_consistency_request) {
m_show_consistency_hint = false;
SecondaryCheckDialog* consistency_dlg = new SecondaryCheckDialog(m_scrolledWindow, wxID_ANY, _L("Update firmware"));
consistency_dlg->update_text(_L(
SecondaryCheckDialog consistency_dlg(this->GetParent(), wxID_ANY, _L("Update firmware"), SecondaryCheckDialog::ButtonStyle::CONFIRM_AND_CANCEL, wxDefaultPosition, wxDefaultSize, wxPD_APP_MODAL | wxCLOSE_BOX | wxCAPTION);
consistency_dlg.update_text(_L(
"The firmware version is abnormal. Repairing and updating are required before printing. Do you want to update now? You can also update later on printer or update next time starting the studio."
));
consistency_dlg->Bind(EVT_SECONDARY_CHECK_CONFIRM, &MachineInfoPanel::on_consisitency_upgrade_firmware, m_push_upgrade_panel);