From 127bdaa2d8a869112fd6ec908cf115f391dbba24 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Jan 2024 01:44:49 +0100 Subject: Remember some more paths when selecting files (#2728). * export subtitles * export video * debug log * cinema database * config file --- src/wx/file_picker_ctrl.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/wx/file_picker_ctrl.h') diff --git a/src/wx/file_picker_ctrl.h b/src/wx/file_picker_ctrl.h index 2411254fa..57363b0c7 100644 --- a/src/wx/file_picker_ctrl.h +++ b/src/wx/file_picker_ctrl.h @@ -24,25 +24,39 @@ LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS #include +#include class FilePickerCtrl : public wxPanel { public: - FilePickerCtrl (wxWindow* parent, wxString prompt, wxString wildcard, bool open, bool warn_overwrite); - - boost::filesystem::path path() const; - void set_path(boost::filesystem::path path); + FilePickerCtrl( + wxWindow* parent, + wxString prompt, + wxString wildcard, + bool open, + bool warn_overwrite, + std::string initial_path_key, + boost::optional initial_filename = boost::optional(), + boost::optional override_path = boost::optional() + ); + + boost::optional path() const; + void set_path(boost::optional path); void set_wildcard(wxString); private: void browse_clicked (); + void set_filename(boost::optional filename); wxButton* _file; - boost::filesystem::path _path; + boost::optional _path; wxSizer* _sizer; wxString _prompt; wxString _wildcard; bool _open; bool _warn_overwrite; + std::string _initial_path_key; + boost::optional _initial_filename; + boost::optional _override_path; }; -- cgit v1.2.3