X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fchristie_certificate_panel.cc;h=77516fb8229d306f66c67345140ff217a0473868;hb=9bebb9724c5b7f254e3cea62a5cdb3c5e0e8571e;hp=c4584ed3c304f8a096664571f1eca431a61d9c3f;hpb=c04fec82d25127fafa73c3daff87bece9aa8c8e8;p=dcpomatic.git diff --git a/src/wx/christie_certificate_panel.cc b/src/wx/christie_certificate_panel.cc index c4584ed3c..77516fb82 100644 --- a/src/wx/christie_certificate_panel.cc +++ b/src/wx/christie_certificate_panel.cc @@ -62,25 +62,27 @@ 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)); + auto error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1, _2)); if (error) { all_errors = *error; - string const url = String::compose ("%1IMB-S2/IMB-S2_%2_sha256.pem", prefix, serial); + auto const url = String::compose ("%1IMB-S2/IMB-S2_%2_sha256.pem", prefix, serial); - error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1)); + error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1, _2)); 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)); } }