diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-09-19 21:39:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-09-19 21:39:01 +0100 |
| commit | cd6fd2ab18bdc1364ede3a33773df4e3ad719efa (patch) | |
| tree | ca7007518c890a37f2dd85493e7ee5ce27ffc4a0 /src/wx/screen_dialog.cc | |
| parent | 8446a529b08d754c7ffe968baef54e5c115c26a5 (diff) | |
Various KDM and encryption fixes.
Diffstat (limited to 'src/wx/screen_dialog.cc')
| -rw-r--r-- | src/wx/screen_dialog.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index 7ff519713..6584e1ad6 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -84,14 +84,15 @@ void ScreenDialog::load_certificate (wxCommandEvent &) { wxFileDialog* d = new wxFileDialog (this, _("Select Certificate File")); - d->ShowModal (); - - try { - _certificate.reset (new libdcp::Certificate (wx_to_std (d->GetPath ()))); - _certificate_text->SetValue (_certificate->certificate ()); - } catch (libdcp::MiscError& e) { - error_dialog (this, String::compose ("Could not read certificate file (%1)", e.what())); - } + if (d->ShowModal () == wxID_OK) { + try { + _certificate.reset (new libdcp::Certificate (boost::filesystem::path (wx_to_std (d->GetPath ())))); + _certificate_text->SetValue (_certificate->certificate ()); + } catch (libdcp::MiscError& e) { + error_dialog (this, String::compose ("Could not read certificate file (%1)", e.what())); + } + } + d->Destroy (); } |
