using boost::optional;
using dcp::raw_convert;
-DolbyDoremiCertificatePanel::DolbyDoremiCertificatePanel (wxWindow* parent, wxStaticText* message, DownloadCertificateDialog* dialog)
- : DownloadCertificatePanel (parent, message, dialog)
+DolbyDoremiCertificatePanel::DolbyDoremiCertificatePanel (DownloadCertificateDialog* dialog)
+ : DownloadCertificatePanel (dialog)
{
}
}
void
-DolbyDoremiCertificatePanel::do_download (string serial)
+DolbyDoremiCertificatePanel::do_download ()
{
+ string const serial = wx_to_std (_serial->GetValue());
+
/* Try dcp2000, imb and ims prefixes (see mantis #375) */
- string const prefix = "ftp://anonymous@ftp.cinema.dolby.com/Certificates/";
+ string const prefix = "ftp://ftp.cinema.dolby.com/Certificates/";
list<string> urls;
list<string> files;
list<string>::const_iterator i = urls.begin ();
list<string>::const_iterator j = files.begin ();
while (!ok && i != urls.end ()) {
- optional<string> error = get_from_zip_url (*i++, *j++, true, boost::bind (&DownloadCertificatePanel::load, this, _1));
+ optional<string> error = get_from_zip_url (*i++, *j++, true, true, boost::bind (&DownloadCertificatePanel::load_certificate, this, _1));
if (error) {
errors.push_back (error.get ());
} else {
}
if (ok) {
- _message->SetLabel (_("Certificate downloaded"));
+ _dialog->message()->SetLabel (_("Certificate downloaded"));
_dialog->setup_sensitivity ();
} else {
- _message->SetLabel (wxT (""));
+ _dialog->message()->SetLabel (wxT (""));
string s;
BOOST_FOREACH (string e, errors) {