X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fdolby_doremi_certificate_panel.cc;fp=src%2Fwx%2Fdolby_doremi_certificate_panel.cc;h=f0f0a2601e219d6d97a74df045d644dad3a51662;hp=5a0ce028e646298e50768ae97a34357da82b21e5;hb=6a69f5ba3ce43094493785bb449c91001557b80d;hpb=7459697905a79ff36c8cd676a9b2f150f6491d6d diff --git a/src/wx/dolby_doremi_certificate_panel.cc b/src/wx/dolby_doremi_certificate_panel.cc index 5a0ce028e..f0f0a2601 100644 --- a/src/wx/dolby_doremi_certificate_panel.cc +++ b/src/wx/dolby_doremi_certificate_panel.cc @@ -38,16 +38,10 @@ using boost::function; using boost::optional; using dcp::raw_convert; -DolbyDoremiCertificatePanel::DolbyDoremiCertificatePanel (wxWindow* parent, DownloadCertificateDialog* dialog) - : DownloadCertificatePanel (parent, dialog) +DolbyDoremiCertificatePanel::DolbyDoremiCertificatePanel (wxWindow* parent, wxStaticText* message, DownloadCertificateDialog* dialog) + : DownloadCertificatePanel (parent, message, dialog) { - add_label_to_sizer (_table, this, _("Serial number"), true); - _serial = new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxSize (300, -1)); - _table->Add (_serial, 1, wxEXPAND); - _serial->Bind (wxEVT_TEXT, boost::bind (&DownloadCertificateDialog::setup_sensitivity, _dialog)); - - layout (); } static void @@ -145,14 +139,13 @@ try_cp850 (list& urls, list& files, string prefix, string serial } void -DolbyDoremiCertificatePanel::do_download (wxStaticText* message) +DolbyDoremiCertificatePanel::do_download (string serial) { /* Try dcp2000, imb and ims prefixes (see mantis #375) */ string const prefix = "ftp://anonymous@ftp.cinema.dolby.com/Certificates/"; list urls; list files; - string const serial = wx_to_std (_serial->GetValue()); bool starts_with_digit = false; optional starting_char; @@ -191,10 +184,10 @@ DolbyDoremiCertificatePanel::do_download (wxStaticText* message) } if (ok) { - message->SetLabel (_("Certificate downloaded")); + _message->SetLabel (_("Certificate downloaded")); _dialog->setup_sensitivity (); } else { - message->SetLabel (wxT ("")); + _message->SetLabel (wxT ("")); string s; BOOST_FOREACH (string e, errors) { @@ -205,12 +198,6 @@ DolbyDoremiCertificatePanel::do_download (wxStaticText* message) } } -bool -DolbyDoremiCertificatePanel::ready_to_download () const -{ - return !_serial->IsEmpty (); -} - wxString DolbyDoremiCertificatePanel::name () const {