mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Use boost::nowide directly from boost (#9037)
* Use `boost::nowide` directly from boost Cherry-picked from prusa3d/PrusaSlicer@bffa3f8578 Co-authored-by: tamasmeszaros <meszaros.q@gmail.com> * Replaced all occurrences of boost::nowide::narrow for wxStrings with into_u8 Cherry-picked from prusa3d/PrusaSlicer@8d6497297a Co-authored-by: tamasmeszaros <meszaros.q@gmail.com> * Fix flatpak build
This commit is contained in:
@@ -227,7 +227,7 @@ std::string PrintHostSendDialog::storage() const
|
||||
return GUI::format("%1%", m_preselected_storage);
|
||||
if (combo_storage->GetSelection() < 0 || combo_storage->GetSelection() >= int(m_paths.size()))
|
||||
return {};
|
||||
return boost::nowide::narrow(m_paths[combo_storage->GetSelection()]);
|
||||
return into_u8(m_paths[combo_storage->GetSelection()]);
|
||||
}
|
||||
|
||||
void PrintHostSendDialog::EndModal(int ret)
|
||||
@@ -491,7 +491,7 @@ void PrintHostQueueDialog::on_progress(Event &evt)
|
||||
wxVariant nm, hst;
|
||||
job_list->GetValue(nm, evt.job_id, COL_FILENAME);
|
||||
job_list->GetValue(hst, evt.job_id, COL_HOST);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_percentage(evt.job_id + 1, boost::nowide::narrow(nm.GetString()), boost::nowide::narrow(hst.GetString()), evt.progress / 100.f);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_percentage(evt.job_id + 1, into_u8(nm.GetString()), into_u8(hst.GetString()), evt.progress / 100.f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ void PrintHostQueueDialog::on_error(Event &evt)
|
||||
wxVariant nm, hst;
|
||||
job_list->GetValue(nm, evt.job_id, COL_FILENAME);
|
||||
job_list->GetValue(hst, evt.job_id, COL_HOST);
|
||||
wxGetApp().notification_manager()->upload_job_notification_show_error(evt.job_id + 1, boost::nowide::narrow(nm.GetString()), boost::nowide::narrow(hst.GetString()));
|
||||
wxGetApp().notification_manager()->upload_job_notification_show_error(evt.job_id + 1, into_u8(nm.GetString()), into_u8(hst.GetString()));
|
||||
}
|
||||
|
||||
void PrintHostQueueDialog::on_cancel(Event &evt)
|
||||
@@ -527,7 +527,7 @@ void PrintHostQueueDialog::on_cancel(Event &evt)
|
||||
wxVariant nm, hst;
|
||||
job_list->GetValue(nm, evt.job_id, COL_FILENAME);
|
||||
job_list->GetValue(hst, evt.job_id, COL_HOST);
|
||||
wxGetApp().notification_manager()->upload_job_notification_show_canceled(evt.job_id + 1, boost::nowide::narrow(nm.GetString()), boost::nowide::narrow(hst.GetString()));
|
||||
wxGetApp().notification_manager()->upload_job_notification_show_canceled(evt.job_id + 1, into_u8(nm.GetString()), into_u8(hst.GetString()));
|
||||
}
|
||||
|
||||
void PrintHostQueueDialog::on_info(Event& evt)
|
||||
@@ -538,17 +538,17 @@ void PrintHostQueueDialog::on_info(Event& evt)
|
||||
if (evt.tag == L"resolve") {
|
||||
wxVariant hst(evt.status);
|
||||
job_list->SetValue(hst, evt.job_id, COL_HOST);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_host(evt.job_id + 1, boost::nowide::narrow(evt.status));
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_host(evt.job_id + 1, into_u8(evt.status));
|
||||
} else if (evt.tag == L"complete") {
|
||||
wxVariant hst(evt.status);
|
||||
job_list->SetValue(hst, evt.job_id, COL_ERRORMSG);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_completed(evt.job_id + 1);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_status(evt.job_id + 1, boost::nowide::narrow(evt.status));
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_status(evt.job_id + 1, into_u8(evt.status));
|
||||
} else if(evt.tag == L"complete_with_warning"){
|
||||
wxVariant hst(evt.status);
|
||||
job_list->SetValue(hst, evt.job_id, COL_ERRORMSG);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_completed_with_warning(evt.job_id + 1);
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_status(evt.job_id + 1, boost::nowide::narrow(evt.status));
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_status(evt.job_id + 1, into_u8(evt.status));
|
||||
} else if (evt.tag == L"set_complete_off") {
|
||||
wxGetApp().notification_manager()->set_upload_job_notification_comp_on_100(evt.job_id + 1, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user