Fix missing scrollbar in the audio tab on macOS/Windows (#2480).
[dcpomatic.git] / src / wx / player_config_dialog.cc
index 947afa500dcb9ed529c14f7cba11d687ac815de4..aea421dda932e47b33c2fcf54fc6063192e72346 100644 (file)
 #include <dcp/certificate_chain.h>
 #include <dcp/exceptions.h>
 #include <dcp/locale_convert.h>
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/filepicker.h>
 #include <wx/preferences.h>
 #include <wx/spinctrl.h>
 #include <wx/stdpaths.h>
+LIBDCP_ENABLE_WARNINGS
 #include <RtAudio.h>
 #include <boost/filesystem.hpp>
 
@@ -130,7 +133,7 @@ private:
                _player_mode->Bind (wxEVT_CHOICE, bind(&PlayerGeneralPage::player_mode_changed, this));
                _image_display->Bind (wxEVT_CHOICE, bind(&PlayerGeneralPage::image_display_changed, this));
                _video_display_mode->Bind (wxEVT_CHOICE, bind(&PlayerGeneralPage::video_display_mode_changed, this));
-               _respect_kdm->Bind (wxEVT_CHECKBOX, bind(&PlayerGeneralPage::respect_kdm_changed, this));
+               _respect_kdm->bind(&PlayerGeneralPage::respect_kdm_changed, this);
                _debug_log_file->Bind (wxEVT_FILEPICKER_CHANGED, bind(&PlayerGeneralPage::debug_log_file_changed, this));
        }
 
@@ -211,7 +214,7 @@ private:
        wxChoice* _player_mode;
        wxChoice* _image_display;
        wxChoice* _video_display_mode;
-       wxCheckBox* _respect_kdm;
+       CheckBox* _respect_kdm;
        FilePickerCtrl* _debug_log_file;
 };
 
@@ -238,7 +241,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap ("advanced", wxBITMAP_TYPE_PNG_RESOURCE);
+               return wxBitmap(icon_path("advanced"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -272,6 +275,8 @@ private:
                        /// TRANSLATORS: translate the word "Timing" here; do not include the "Config|" prefix
                        _log_timing = new CheckBox (_panel, S_("Config|Timing"));
                        t->Add (_log_timing, 1, wxEXPAND | wxALL);
+                       _log_debug_video_view = new CheckBox(_panel, _("Debug: video view"));
+                       t->Add(_log_debug_video_view, 1, wxEXPAND | wxALL);
                        table->Add (t, 0, wxALL, 6);
                }
 
@@ -281,12 +286,13 @@ private:
                table->AddSpacer (0);
 #endif
 
-               _log_general->Bind (wxEVT_CHECKBOX, boost::bind (&PlayerAdvancedPage::log_changed, this));
-               _log_warning->Bind (wxEVT_CHECKBOX, boost::bind (&PlayerAdvancedPage::log_changed, this));
-               _log_error->Bind (wxEVT_CHECKBOX, boost::bind (&PlayerAdvancedPage::log_changed, this));
-               _log_timing->Bind (wxEVT_CHECKBOX, boost::bind (&PlayerAdvancedPage::log_changed, this));
+               _log_general->bind(&PlayerAdvancedPage::log_changed, this);
+               _log_warning->bind(&PlayerAdvancedPage::log_changed, this);
+               _log_error->bind(&PlayerAdvancedPage::log_changed, this);
+               _log_timing->bind(&PlayerAdvancedPage::log_changed, this);
+               _log_debug_video_view->bind(&PlayerAdvancedPage::log_changed, this);
 #ifdef DCPOMATIC_WINDOWS
-               _win32_console->Bind (wxEVT_CHECKBOX, boost::bind (&PlayerAdvancedPage::win32_console_changed, this));
+               _win32_console->bind(&PlayerAdvancedPage::win32_console_changed, this);
 #endif
        }
 
@@ -318,6 +324,9 @@ private:
                if (_log_timing->GetValue ()) {
                        types |= LogEntry::TYPE_TIMING;
                }
+               if (_log_debug_video_view->GetValue()) {
+                       types |= LogEntry::TYPE_DEBUG_VIDEO_VIEW;
+               }
                Config::instance()->set_log_types (types);
        }
 
@@ -328,12 +337,13 @@ private:
        }
 #endif
 
-       wxCheckBox* _log_general;
-       wxCheckBox* _log_warning;
-       wxCheckBox* _log_error;
-       wxCheckBox* _log_timing;
+       CheckBox* _log_general;
+       CheckBox* _log_warning;
+       CheckBox* _log_error;
+       CheckBox* _log_timing;
+       CheckBox* _log_debug_video_view;
 #ifdef DCPOMATIC_WINDOWS
-       wxCheckBox* _win32_console;
+       CheckBox* _win32_console;
 #endif
 };