X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fchristie_certificate_panel.cc;h=ab131e015cf0ba95135cef0693e38e2b2b743634;hb=f802565830bed9ec9e7ad6c16ccaa7b0700625d9;hp=2a42a178e77b652d65f95b968f164eafa58fe3f1;hpb=c736fc8881689e9d40564afb61be9238b0109894;p=dcpomatic.git diff --git a/src/wx/christie_certificate_panel.cc b/src/wx/christie_certificate_panel.cc index 2a42a178e..ab131e015 100644 --- a/src/wx/christie_certificate_panel.cc +++ b/src/wx/christie_certificate_panel.cc @@ -28,6 +28,9 @@ using std::string; using boost::optional; using boost::bind; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif ChristieCertificatePanel::ChristieCertificatePanel (DownloadCertificateDialog* dialog) : CredentialsDownloadCertificatePanel ( @@ -59,6 +62,7 @@ ChristieCertificatePanel::do_download () string const url = String::compose ("%1F-IMB/F-IMB_%2_sha256.pem", prefix, serial); optional all_errors; + bool ok = true; optional error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1)); if (error) { @@ -69,15 +73,16 @@ ChristieCertificatePanel::do_download () error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1)); if (error) { *all_errors += "\n" + *error; + ok = false; } } - if (all_errors) { - _dialog->message()->SetLabel(wxT("")); - error_dialog (this, std_to_wx(*all_errors)); - } else { + if (ok) { _dialog->message()->SetLabel (_("Certificate downloaded")); _dialog->setup_sensitivity (); + } else { + _dialog->message()->SetLabel(wxT("")); + error_dialog (this, std_to_wx(*all_errors)); } }