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
using std::string;
using std::cout;
using boost::optional;
ScreenDialog::ScreenDialog (wxWindow* parent, string title, string name, optional<dcp::Certificate> certificate)
using std::string;
using std::cout;
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)
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 = dcp::Certificate (dcp::file_to_string (file));
_certificate_text->SetValue (_certificate->certificate ());
} catch (dcp::MiscError& e) {
_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()));
ScreenDialog::setup_sensitivity ()
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
ScreenDialog::setup_sensitivity ()
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));