+ _info->triggered_update ();
+ }
+
+ void file_add_kdm ()
+ {
+ wxFileDialog* d = new wxFileDialog (this, _("Select KDM"));
+
+ if (d->ShowModal() == wxID_OK) {
+ DCPOMATIC_ASSERT (_film);
+ shared_ptr<DCPContent> dcp = boost::dynamic_pointer_cast<DCPContent>(_film->content().front());
+ DCPOMATIC_ASSERT (dcp);
+ try {
+ dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()), MAX_KDM_SIZE)));
+ dcp->examine (shared_ptr<Job>());
+ } catch (exception& e) {
+ error_dialog (this, wxString::Format (_("Could not load KDM.")), std_to_wx(e.what()));
+ d->Destroy ();
+ return;
+ }
+ }
+
+ d->Destroy ();
+ _info->triggered_update ();
+ }
+
+ void file_close ()
+ {
+ _viewer->set_film (shared_ptr<Film>());
+ _film.reset ();
+ _info->triggered_update ();
+ set_menu_sensitivity ();