X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fplayer_config_dialog.cc;h=be310a93170cf488a2bfd21f3a97bd880ed897b9;hb=1a721b82d4094c00ee89574e17c58c23c0de8cdd;hp=91434beaeb6a64b36539f3acf2d74c9faeb72757;hpb=cfbe9d2f44e380efed7a61b5b5c7a2fec7794915;p=dcpomatic.git diff --git a/src/wx/player_config_dialog.cc b/src/wx/player_config_dialog.cc index 91434beae..be310a931 100644 --- a/src/wx/player_config_dialog.cc +++ b/src/wx/player_config_dialog.cc @@ -18,58 +18,63 @@ */ + /** @file src/player_config_dialog.cc * @brief A dialogue to edit DCP-o-matic Player configuration. */ + +#include "check_box.h" #include "config_dialog.h" -#include "wx_util.h" +#include "dir_picker_ctrl.h" #include "editable_list.h" -#include "filter_dialog.h" +#include "email_dialog.h" #include "file_picker_ctrl.h" -#include "dir_picker_ctrl.h" -#include "server_dialog.h" +#include "filter_dialog.h" #include "make_chain_dialog.h" -#include "email_dialog.h" -#include "name_format_editor.h" #include "nag_dialog.h" -#include "check_box.h" +#include "name_format_editor.h" +#include "server_dialog.h" #include "static_text.h" +#include "wx_util.h" #include "lib/config.h" -#include "lib/ratio.h" -#include "lib/filter.h" +#include "lib/cross.h" #include "lib/dcp_content_type.h" +#include "lib/exceptions.h" +#include "lib/filter.h" #include "lib/log.h" +#include "lib/ratio.h" #include "lib/util.h" -#include "lib/cross.h" -#include "lib/exceptions.h" -#include -#include #include -#include +#include +#include +#include +LIBDCP_DISABLE_WARNINGS +#include #include #include -#include +#include +LIBDCP_ENABLE_WARNINGS #include #include -#include -using std::vector; -using std::string; + +using std::function; using std::list; -using std::cout; -using std::pair; using std::make_pair; using std::map; -using boost::bind; +using std::pair; using std::shared_ptr; -using std::function; +using std::string; +using std::vector; +using boost::bind; using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif using dcp::locale_convert; + class PlayerGeneralPage : public GeneralPage { public: @@ -78,7 +83,7 @@ public: {} private: - void setup () + void setup () override { wxGridBagSizer* table = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border); @@ -132,7 +137,7 @@ private: _debug_log_file->Bind (wxEVT_FILEPICKER_CHANGED, bind(&PlayerGeneralPage::debug_log_file_changed, this)); } - void config_changed () + void config_changed () override { GeneralPage::config_changed (); @@ -228,13 +233,13 @@ public: , _log_timing (0) {} - wxString GetName () const + wxString GetName () const override { return _("Advanced"); } #ifdef DCPOMATIC_OSX - wxBitmap GetLargeIcon () const + wxBitmap GetLargeIcon () const override { return wxBitmap ("advanced", wxBITMAP_TYPE_PNG_RESOURCE); } @@ -252,9 +257,9 @@ private: table->Add (m, 0, flags, DCPOMATIC_SIZER_Y_GAP); } - void setup () + void setup () override { - wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); + auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); table->AddGrowableCol (1, 1); _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border); @@ -288,9 +293,9 @@ private: #endif } - void config_changed () + void config_changed () override { - Config* config = Config::instance (); + auto config = Config::instance (); checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL); checked_set (_log_warning, config->log_types() & LogEntry::TYPE_WARNING); @@ -339,17 +344,17 @@ private: wxPreferencesEditor* create_player_config_dialog () { - wxPreferencesEditor* e = new wxPreferencesEditor (_("DCP-o-matic Player Preferences")); + auto e = new wxPreferencesEditor (_("DCP-o-matic Player Preferences")); #ifdef DCPOMATIC_OSX /* Width that we force some of the config panels to be on OSX so that the containing window doesn't shrink too much when we select those panels. This is obviously an unpleasant hack. */ - wxSize ps = wxSize (520, -1); + auto ps = wxSize (520, -1); int const border = 16; #else - wxSize ps = wxSize (-1, -1); + auto ps = wxSize (-1, -1); int const border = 8; #endif