+
+ setup_sensitivity ();
+}
+
+void
+ScreenDialog::download_certificate ()
+{
+ if (_manufacturer->GetStringSelection() == _("Doremi")) {
+ DownloadCertificateDialog* d = new DoremiCertificateDialog (this, boost::bind (&ScreenDialog::load_certificate, this, _1));
+ d->ShowModal ();
+ d->Destroy ();
+ } else if (_manufacturer->GetStringSelection() == _("Dolby")) {
+ DownloadCertificateDialog* d = new DolbyCertificateDialog (this, boost::bind (&ScreenDialog::load_certificate, this, _1));
+ d->ShowModal ();
+ d->Destroy ();
+ }
+
+ setup_sensitivity ();
+}
+
+void
+ScreenDialog::setup_sensitivity ()
+{
+ wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
+ ok->Enable (_certificate.get ());
+
+ _download_certificate->Enable (
+ _manufacturer->GetStringSelection() == _("Doremi") ||
+ _manufacturer->GetStringSelection() == _("Dolby")
+ );