using boost::optional;
ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, optional<dcp::Certificate> certificate)
- : TableDialog (parent, std_to_wx (title), 2, true)
+ : TableDialog (parent, std_to_wx (title), 2, 1, true)
, _certificate (certificate)
{
add (_("Name"), true);
_certificate = dcp::Certificate (dcp::file_to_string (file));
_certificate_text->SetValue (_certificate->certificate ());
} catch (dcp::MiscError& e) {
- error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), e.what()));
+ error_dialog (this, wxString::Format (_("Could not read certificate file (%s)"), std_to_wx(e.what()).data()));
}
}
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
if (ok) {
- ok->Enable (_certificate);
+ ok->Enable (static_cast<bool>(_certificate));
}
_download_certificate->Enable (