diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-11 22:55:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-11 22:55:27 +0100 |
| commit | 8a04d3d74cdb756baa399cc7693393285b064c59 (patch) | |
| tree | 53cf594d13f198b1747ca0021777af8170820350 /src/wx/content_menu.cc | |
| parent | 8282169ec34b0186f5052a2d931360779c932492 (diff) | |
Store last path for adding KDMs (#2348).
Diffstat (limited to 'src/wx/content_menu.cc')
| -rw-r--r-- | src/wx/content_menu.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc index 5d9865970..b9214e6a7 100644 --- a/src/wx/content_menu.cc +++ b/src/wx/content_menu.cc @@ -24,6 +24,7 @@ #include "content_menu.h" #include "content_properties_dialog.h" #include "dir_dialog.h" +#include "file_dialog.h" #include "film_viewer.h" #include "repeat_dialog.h" #include "timeline_video_content_view.h" @@ -402,15 +403,15 @@ ContentMenu::kdm () auto dcp = dynamic_pointer_cast<DCPContent> (_content.front()); DCPOMATIC_ASSERT (dcp); - wxFileDialog dialog(_parent, _("Select KDM")); + FileDialog dialog(_parent, _("Select KDM"), wxT("XML files|*.xml|All files|*.*"), wxFD_MULTIPLE, "AddKDMPath"); - if (dialog.ShowModal() != wxID_OK) { + if (!dialog.show()) { return; } optional<dcp::EncryptedKDM> kdm; try { - kdm = dcp::EncryptedKDM(dcp::file_to_string(wx_to_std(dialog.GetPath()), MAX_KDM_SIZE)); + kdm = dcp::EncryptedKDM(dcp::file_to_string(dialog.path(), MAX_KDM_SIZE)); } catch (exception& e) { error_dialog (_parent, _("Could not load KDM"), std_to_wx(e.what())); return; |
