Remove Scaler config and use SWS_BICUBIC everywhere.
[dcpomatic.git] / src / wx / config_dialog.cc
index c844d8262287a4c2103c3bf7b92d41fda2839ebe..eee2c375608278e4bdb52067b4ebe1e710e5002f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -33,7 +33,6 @@
 #include <dcp/signer.h>
 #include "lib/config.h"
 #include "lib/ratio.h"
-#include "lib/scaler.h"
 #include "lib/filter.h"
 #include "lib/dcp_content_type.h"
 #include "lib/colour_conversion.h"
@@ -86,6 +85,11 @@ public:
        GeneralPage (wxSize panel_size, int border)
                : wxStockPreferencesPage (Kind_General)
                , Page (panel_size, border)
+               , _set_language (0)
+               , _language (0)
+               , _num_local_encoding_threads (0)
+               , _check_for_updates (0)
+               , _check_for_test_updates (0)
        {}
 
        wxWindow* CreateWindow (wxWindow* parent)
@@ -234,6 +238,14 @@ class DefaultsPage : public wxPreferencesPage, public Page
 public:
        DefaultsPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _j2k_bandwidth (0)
+               , _audio_delay (0)
+               , _isdcf_metadata_button (0)
+               , _still_length (0)
+               , _directory (0)
+               , _container (0)
+               , _dcp_content_type (0)
+               , _issuer (0)
        {}
        
        wxString GetName () const
@@ -349,10 +361,17 @@ public:
                _issuer->SetValue (std_to_wx (config->dcp_issuer ()));
                _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::issuer_changed, this));
 
+               _config_connection = config->Changed.connect (boost::bind (&DefaultsPage::config_changed, this));
+
                return panel;
        }
 
 private:
+       void config_changed ()
+       {
+               _j2k_bandwidth->SetRange (50, Config::instance()->maximum_j2k_bandwidth() / 1000000);
+       }
+               
        void j2k_bandwidth_changed ()
        {
                Config::instance()->set_default_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000);
@@ -410,6 +429,8 @@ private:
        wxChoice* _container;
        wxChoice* _dcp_content_type;
        wxTextCtrl* _issuer;
+
+       boost::signals2::scoped_connection _config_connection;
 };
 
 class EncodingServersPage : public wxPreferencesPage, public Page
@@ -417,6 +438,8 @@ class EncodingServersPage : public wxPreferencesPage, public Page
 public:
        EncodingServersPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _use_any_servers (0)
+               , _servers_list (0)
        {}
        
        wxString GetName () const
@@ -521,6 +544,18 @@ class KeysPage : public wxPreferencesPage, public Page
 public:
        KeysPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _panel (0)
+               , _certificates (0)
+               , _add_certificate (0)
+               , _remove_certificate (0)
+               , _remake_certificates (0)
+               , _signer_private_key (0)
+               , _load_signer_private_key (0)
+               , _decryption_certificate (0)
+               , _load_decryption_certificate (0)
+               , _decryption_private_key (0)
+               , _load_decryption_private_key (0)
+               , _export_decryption_certificate (0)
        {}
 
        wxString GetName () const
@@ -854,6 +889,10 @@ class TMSPage : public wxPreferencesPage, public Page
 public:
        TMSPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _tms_ip (0)
+               , _tms_path (0)
+               , _tms_user (0)
+               , _tms_password (0)
        {}
 
        wxString GetName () const
@@ -939,6 +978,15 @@ public:
 
        KDMEmailPage (wxSize panel_size, int border)
                : Page (panel_size, border)
+               , _mail_server (0)
+               , _mail_user (0)
+               , _mail_password (0)
+               , _kdm_subject (0)
+               , _kdm_from (0)
+               , _kdm_cc (0)
+               , _kdm_bcc (0)
+               , _kdm_email (0)
+               , _reset_kdm_email (0)
        {}
        
        wxString GetName () const
@@ -1099,6 +1147,12 @@ public:
        AdvancedPage (wxSize panel_size, int border)
                : wxStockPreferencesPage (Kind_Advanced)
                , Page (panel_size, border)
+               , _maximum_j2k_bandwidth (0)
+               , _allow_any_dcp_frame_rate (0)
+               , _log_general (0)
+               , _log_warning (0)
+               , _log_error (0)
+               , _log_timing (0)
        {}
        
        wxWindow* CreateWindow (wxWindow* parent)
@@ -1151,7 +1205,7 @@ public:
                
                Config* config = Config::instance ();
                
-               _maximum_j2k_bandwidth->SetRange (1, 500);
+               _maximum_j2k_bandwidth->SetRange (1, 1000);
                _maximum_j2k_bandwidth->SetValue (config->maximum_j2k_bandwidth() / 1000000);
                _maximum_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
                _allow_any_dcp_frame_rate->SetValue (config->allow_any_dcp_frame_rate ());