diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/christie_certificate_panel.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wx/christie_certificate_panel.cc b/src/wx/christie_certificate_panel.cc index c4584ed3c..ab131e015 100644 --- a/src/wx/christie_certificate_panel.cc +++ b/src/wx/christie_certificate_panel.cc @@ -62,6 +62,7 @@ ChristieCertificatePanel::do_download () string const url = String::compose ("%1F-IMB/F-IMB_%2_sha256.pem", prefix, serial); optional<string> all_errors; + bool ok = true; optional<string> error = get_from_url (url, true, false, boost::bind(&DownloadCertificatePanel::load_certificate_from_chain, this, _1)); if (error) { @@ -72,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)); } } |
