Use different icons for the timeline in dark/light modes.
[dcpomatic.git] / src / wx / full_config_dialog.cc
index 8fc029f747c8388413e8a684101c22cb038d439b..1aeacd3cacd9ae05df0aabcb7ebe9b1eb84acd0b 100644 (file)
@@ -118,7 +118,7 @@ private:
                add_label_to_sizer (table, _panel, _("Cinema and screen database file"), true, wxGBPosition (r, 0));
                _cinemas_file = new FilePickerCtrl (_panel, _("Select cinema and screen database file"), "*.xml", true, false);
                table->Add (_cinemas_file, wxGBPosition (r, 1));
-               Button* export_cinemas = new Button (_panel, _("Export..."));
+               auto export_cinemas = new Button (_panel, _("Export..."));
                table->Add (export_cinemas, wxGBPosition (r, 2));
                ++r;
 
@@ -173,7 +173,7 @@ private:
                 );
 
                if (d->ShowModal () == wxID_OK) {
-                       boost::filesystem::copy_file (Config::instance()->cinemas_file(), wx_to_std(d->GetPath()));
+                       boost::filesystem::copy_file(Config::instance()->cinemas_file(), wx_to_std(d->GetPath()), boost::filesystem::copy_option::overwrite_if_exists);
                }
                d->Destroy ();
        }
@@ -257,7 +257,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("defaults"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("defaults"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -615,7 +615,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("servers"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("servers"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -633,7 +633,7 @@ private:
                        boost::bind (&Config::servers, Config::instance()),
                        boost::bind (&Config::set_servers, Config::instance(), _1),
                        boost::bind (&EncodingServersPage::server_column, this, _1),
-                       false,
+                       EditableListTitle::INVISIBLE,
                        EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
                        );
 
@@ -678,7 +678,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("tms"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("tms"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -789,7 +789,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("email"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("email"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -961,7 +961,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("kdm_email"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("kdm_email"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -991,7 +991,7 @@ private:
                        [] (string s, int) {
                                return s;
                        },
-                       true,
+                       EditableListTitle::VISIBLE,
                        EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
                        );
                table->Add (_cc, 1, wxEXPAND | wxALL);
@@ -1086,7 +1086,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("notifications"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("notifications"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1128,7 +1128,7 @@ private:
                        [] (string s, int) {
                                return s;
                        },
-                       true,
+                       EditableListTitle::VISIBLE,
                        EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
                        );
                table->Add (_cc, 1, wxEXPAND | wxALL);
@@ -1262,7 +1262,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("cover_sheet"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("cover_sheet"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1321,7 +1321,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("identifiers"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("identifiers"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1439,7 +1439,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("advanced"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(icon_path("advanced"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1495,6 +1495,10 @@ private:
                table->Add (_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
 
+               _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels"));
+               table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+               table->AddSpacer(0);
+
                _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors"));
                table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
@@ -1598,6 +1602,7 @@ private:
                _allow_any_dcp_frame_rate->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
                _allow_any_container->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::allow_any_container_changed, this));
                _allow_96khz_audio->Bind (wxEVT_CHECKBOX, boost::bind(&AdvancedPage::allow_96khz_audio_changed, this));
+               _use_all_audio_channels->Bind(wxEVT_CHECKBOX, boost::bind(&AdvancedPage::use_all_channels_changed, this));
                _show_experimental_audio_processors->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::show_experimental_audio_processors_changed, this));
                _only_servers_encode->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::only_servers_encode_changed, this));
                _frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this));
@@ -1634,6 +1639,7 @@ private:
                checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ());
                checked_set (_allow_any_container, config->allow_any_container ());
                checked_set (_allow_96khz_audio, config->allow_96khz_audio());
+               checked_set (_use_all_audio_channels, config->use_all_audio_channels());
                checked_set (_show_experimental_audio_processors, config->show_experimental_audio_processors ());
                checked_set (_only_servers_encode, config->only_servers_encode ());
                checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL);
@@ -1686,6 +1692,11 @@ private:
                Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue());
        }
 
+       void use_all_channels_changed ()
+       {
+               Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue());
+       }
+
        void show_experimental_audio_processors_changed ()
        {
                Config::instance()->set_show_experimental_audio_processors(_show_experimental_audio_processors->GetValue());
@@ -1755,6 +1766,7 @@ private:
        wxCheckBox* _allow_any_dcp_frame_rate = nullptr;
        wxCheckBox* _allow_any_container = nullptr;
        wxCheckBox* _allow_96khz_audio = nullptr;
+       wxCheckBox* _use_all_audio_channels = nullptr;
        wxCheckBox* _show_experimental_audio_processors = nullptr;
        wxCheckBox* _only_servers_encode = nullptr;
        NameFormatEditor* _dcp_metadata_filename_format = nullptr;