projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Separate readable error from technical detail in some places.
[dcpomatic.git]
/
src
/
wx
/
content_menu.cc
diff --git
a/src/wx/content_menu.cc
b/src/wx/content_menu.cc
index 42969995643eb2d94ffa9c0066574720e53f063c..2a91831341fc506bbd1ed739febb19db3c02c946 100644
(file)
--- a/
src/wx/content_menu.cc
+++ b/
src/wx/content_menu.cc
@@
-143,6
+143,8
@@
ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
}
} catch (dcp::DCPReadError) {
/* The DCP is probably missing */
}
} catch (dcp::DCPReadError) {
/* The DCP is probably missing */
+ } catch (dcp::KDMDecryptionError) {
+ /* We have an incorrect KDM */
}
} else {
_kdm->Enable (false);
}
} else {
_kdm->Enable (false);
@@
-300,7
+302,11
@@
ContentMenu::find_missing ()
list<shared_ptr<Content> > content;
if (r == wxID_OK) {
list<shared_ptr<Content> > content;
if (r == wxID_OK) {
- content = content_factory (film, path);
+ if (dc) {
+ content.push_back (shared_ptr<DCPContent> (new DCPContent (film, path)));
+ } else {
+ content = content_factory (film, path);
+ }
}
if (content.empty ()) {
}
if (content.empty ()) {
@@
-355,7
+361,7
@@
ContentMenu::maybe_found_missing (weak_ptr<Job> j, weak_ptr<Content> oc, weak_pt
return;
}
return;
}
- old_content->set_path
(new_content->path (0
));
+ old_content->set_path
s (new_content->paths(
));
}
void
}
void
@@
-371,7
+377,7
@@
ContentMenu::kdm ()
try {
dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()), MAX_KDM_SIZE)));
} catch (exception& e) {
try {
dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()), MAX_KDM_SIZE)));
} catch (exception& e) {
- error_dialog (_parent, wxString::Format (_("Could not load KDM
(%s)"), e.what
()));
+ error_dialog (_parent, wxString::Format (_("Could not load KDM
.")), std_to_wx(e.what
()));
d->Destroy ();
return;
}
d->Destroy ();
return;
}