From c9882f73054187c39ed204d675104ff1e1ce56f0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 23 Jan 2022 20:47:34 +0100 Subject: [PATCH] Remove unused file_dialog_wrapper.h --- src/tools/dcpomatic_kdm.cc | 1 - src/wx/file_dialog_wrapper.h | 58 ------------------------------------ src/wx/recipient_dialog.cc | 15 +++++----- src/wx/screen_dialog.cc | 1 - 4 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 src/wx/file_dialog_wrapper.h diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 4a98619f2..9a65314e5 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -22,7 +22,6 @@ #include "wx/about_dialog.h" #include "wx/dcpomatic_button.h" #include "wx/editable_list.h" -#include "wx/file_dialog_wrapper.h" #include "wx/file_picker_ctrl.h" #include "wx/full_config_dialog.h" #include "wx/job_view_dialog.h" diff --git a/src/wx/file_dialog_wrapper.h b/src/wx/file_dialog_wrapper.h deleted file mode 100644 index 8223371db..000000000 --- a/src/wx/file_dialog_wrapper.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2012-2021 Carl Hetherington - - 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. - - 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 DCP-o-matic. If not, see . - -*/ - - -#include "wx_util.h" -#include - - -template -class FileDialogWrapper -{ -public: - FileDialogWrapper (wxWindow* parent, wxString title) - : _parent (parent) - { - _dialog = new wxFileDialog (parent, title); - } - - void set (T) {} - - boost::optional get () - { - return T (dcp::file_to_string(wx_to_std(_dialog->GetPath()))); - } - - int ShowModal () - { - return _dialog->ShowModal (); - } - - void Destroy () - { - _dialog->Destroy (); - /* eek! */ - delete this; - } - -protected: - wxWindow* _parent; - wxFileDialog* _dialog; -}; diff --git a/src/wx/recipient_dialog.cc b/src/wx/recipient_dialog.cc index 3c0331e9f..41ddd90d2 100644 --- a/src/wx/recipient_dialog.cc +++ b/src/wx/recipient_dialog.cc @@ -18,13 +18,13 @@ */ + +#include "dcpomatic_button.h" +#include "download_certificate_dialog.h" #include "recipient_dialog.h" -#include "wx_util.h" -#include "file_dialog_wrapper.h" #include "static_text.h" -#include "download_certificate_dialog.h" #include "table_dialog.h" -#include "dcpomatic_button.h" +#include "wx_util.h" #include "lib/compose.hpp" #include "lib/util.h" #include @@ -36,12 +36,13 @@ DCPOMATIC_DISABLE_WARNINGS DCPOMATIC_ENABLE_WARNINGS #include -using std::string; + using std::cout; -using std::vector; using std::list; -using boost::optional; +using std::string; +using std::vector; using boost::bind; +using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index af5e25f47..ecac974e2 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -21,7 +21,6 @@ #include "dcpomatic_button.h" #include "download_certificate_dialog.h" -#include "file_dialog_wrapper.h" #include "screen_dialog.h" #include "static_text.h" #include "table_dialog.h" -- 2.30.2