X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffile_dialog_wrapper.h;h=8223371dbce0399b2d40ff221dff092eae9d22ec;hb=3a796160854b2bde5ffa743fb35d758e06cc9a7b;hp=d30d6ef91e3926c55b6e88e0a181e9bbd30a3088;hpb=c55877926307d7018942beb5fd65a39f278e05de;p=dcpomatic.git diff --git a/src/wx/file_dialog_wrapper.h b/src/wx/file_dialog_wrapper.h index d30d6ef91..8223371db 100644 --- a/src/wx/file_dialog_wrapper.h +++ b/src/wx/file_dialog_wrapper.h @@ -1,24 +1,28 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ + +#include "wx_util.h" #include + template class FileDialogWrapper { @@ -31,9 +35,9 @@ public: void set (T) {} - T get () + boost::optional get () { - return T (dcp::file_to_string (wx_to_std (_dialog->GetPath ()))); + return T (dcp::file_to_string(wx_to_std(_dialog->GetPath()))); } int ShowModal () @@ -48,7 +52,7 @@ public: delete this; } -private: +protected: wxWindow* _parent; wxFileDialog* _dialog; };