- wxChoice* _player_mode;
- wxChoice* _image_display;
- wxCheckBox* _respect_kdm;
- FilePickerCtrl* _log_file;
- wxDirPickerCtrl* _dcp_directory;
- wxDirPickerCtrl* _kdm_directory;
-#ifdef DCPOMATIC_VARIANT_SWAROOP
- FilePickerCtrl* _background_image;
+ _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);
+#ifdef DCPOMATIC_WINDOWS
+ _win32_console->bind(&PlayerAdvancedPage::win32_console_changed, this);
+#endif
+ }
+
+ void config_changed () override
+ {
+ auto config = Config::instance ();
+
+ checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL);
+ checked_set (_log_warning, config->log_types() & LogEntry::TYPE_WARNING);
+ checked_set (_log_error, config->log_types() & LogEntry::TYPE_ERROR);
+ checked_set (_log_timing, config->log_types() & LogEntry::TYPE_TIMING);
+#ifdef DCPOMATIC_WINDOWS
+ checked_set (_win32_console, config->win32_console());
+#endif
+ }
+
+ void log_changed ()
+ {
+ int types = 0;
+ if (_log_general->GetValue ()) {
+ types |= LogEntry::TYPE_GENERAL;
+ }
+ if (_log_warning->GetValue ()) {
+ types |= LogEntry::TYPE_WARNING;
+ }
+ if (_log_error->GetValue ()) {
+ types |= LogEntry::TYPE_ERROR;
+ }
+ if (_log_timing->GetValue ()) {
+ types |= LogEntry::TYPE_TIMING;
+ }
+ Config::instance()->set_log_types (types);
+ }
+
+#ifdef DCPOMATIC_WINDOWS
+ void win32_console_changed ()
+ {
+ Config::instance()->set_win32_console (_win32_console->GetValue ());
+ }
+#endif
+
+ CheckBox* _log_general;
+ CheckBox* _log_warning;
+ CheckBox* _log_error;
+ CheckBox* _log_timing;
+#ifdef DCPOMATIC_WINDOWS
+ CheckBox* _win32_console;