This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, shared_ptr<dcp::Certificate> certificate)
+ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, optional<dcp::Certificate> certificate)
: TableDialog (parent, std_to_wx (title), 2, true)
, _certificate (certificate)
{
: TableDialog (parent, std_to_wx (title), 2, true)
, _certificate (certificate)
{
add (_("Certificate"), true);
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_load_certificate = new wxButton (this, wxID_ANY, _("Load from file..."));
add (_("Certificate"), true);
wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
_load_certificate = new wxButton (this, wxID_ANY, _("Load from file..."));
s->Add (_load_certificate, 1, wxEXPAND);
s->Add (_download_certificate, 1, wxEXPAND);
add (s);
s->Add (_load_certificate, 1, wxEXPAND);
s->Add (_download_certificate, 1, wxEXPAND);
add (s);
_certificate_text->SetValue (_certificate->certificate ());
} catch (dcp::MiscError& e) {
error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), e.what()));
_certificate_text->SetValue (_certificate->certificate ());
} catch (dcp::MiscError& e) {
error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), e.what()));
ScreenDialog::setup_sensitivity ()
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
ScreenDialog::setup_sensitivity ()
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));