#include "config_dialog.h"
#include "config_move_dialog.h"
#include "dcpomatic_button.h"
+#include "dcpomatic_choice.h"
#include "dir_picker_ctrl.h"
#include "editable_list.h"
#include "email_dialog.h"
#include "file_picker_ctrl.h"
#include "filter_dialog.h"
#include "full_config_dialog.h"
+#include "kdm_choice.h"
+#include "language_tag_widget.h"
#include "make_chain_dialog.h"
#include "nag_dialog.h"
#include "name_format_editor.h"
#include "password_entry.h"
+#include "region_subtag_widget.h"
+#include "send_test_email_dialog.h"
#include "server_dialog.h"
#include "static_text.h"
#include "wx_util.h"
#include "lib/config.h"
#include "lib/cross.h"
#include "lib/dcp_content_type.h"
+#include "lib/emailer.h"
#include "lib/exceptions.h"
#include "lib/filter.h"
#include "lib/log.h"
#include "lib/util.h"
#include <dcp/certificate_chain.h>
#include <dcp/exceptions.h>
+#include <dcp/filesystem.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>
#include <iostream>
{}
private:
- void setup ()
+ void setup () override
{
auto table = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
_panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
++r;
add_label_to_sizer (table, _panel, _("Configuration file"), true, wxGBPosition (r, 0));
- _config_file = new FilePickerCtrl (_panel, _("Select configuration file"), "*.xml", true, false);
+ _config_file = new FilePickerCtrl(_panel, _("Select configuration file"), "*.xml", true, false, "ConfigFilePath");
table->Add (_config_file, wxGBPosition (r, 1));
++r;
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);
+ _cinemas_file = new FilePickerCtrl(_panel, _("Select cinema and screen database file"), "*.xml", true, false, "CinemaDatabasePath");
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;
+ add_label_to_sizer(table, _panel, _("Default \"add file\" location"), true, wxGBPosition(r, 0));
+ _default_add_file_location = new Choice(_panel);
+ table->Add(_default_add_file_location, wxGBPosition(r, 1));
+ ++r;
+
#ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG
_analyse_ebur128 = new CheckBox (_panel, _("Find integrated loudness, true peak and loudness range when analysing audio"));
table->Add (_analyse_ebur128, wxGBPosition (r, 0), wxGBSpan (1, 2));
add_update_controls (table, r);
+ _default_add_file_location->add(_("Same place as last time"));
+ _default_add_file_location->add(_("Same place as project"));
+ _default_add_file_location->bind(&FullGeneralPage::default_add_file_location_changed, this);
+
_config_file->Bind (wxEVT_FILEPICKER_CHANGED, boost::bind(&FullGeneralPage::config_file_changed, this));
_cinemas_file->Bind (wxEVT_FILEPICKER_CHANGED, boost::bind(&FullGeneralPage::cinemas_file_changed, this));
export_cinemas->Bind (wxEVT_BUTTON, boost::bind (&FullGeneralPage::export_cinemas_file, this));
#ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG
- _analyse_ebur128->Bind (wxEVT_CHECKBOX, boost::bind (&FullGeneralPage::analyse_ebur128_changed, this));
+ _analyse_ebur128->bind(&FullGeneralPage::analyse_ebur128_changed, this);
#endif
- _automatic_audio_analysis->Bind (wxEVT_CHECKBOX, boost::bind (&FullGeneralPage::automatic_audio_analysis_changed, this));
+ _automatic_audio_analysis->bind(&FullGeneralPage::automatic_audio_analysis_changed, this);
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
checked_set (_analyse_ebur128, config->analyse_ebur128 ());
#endif
checked_set (_automatic_audio_analysis, config->automatic_audio_analysis ());
- checked_set (_config_file, config->config_file());
+ checked_set (_config_file, config->config_read_file());
checked_set (_cinemas_file, config->cinemas_file());
+ checked_set(_default_add_file_location, config->default_add_file_location() == Config::DefaultAddFileLocation::SAME_AS_LAST_TIME ? 0 : 1);
GeneralPage::config_changed ();
}
void export_cinemas_file ()
{
- auto d = new wxFileDialog (
+ wxFileDialog dialog(
_panel, _("Select Cinemas File"), wxEmptyString, wxEmptyString, wxT("XML files (*.xml)|*.xml"),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT
);
- if (d->ShowModal () == wxID_OK) {
- boost::filesystem::copy_file (Config::instance()->cinemas_file(), wx_to_std(d->GetPath()));
+ if (dialog.ShowModal() == wxID_OK) {
+ dcp::filesystem::copy_file(Config::instance()->cinemas_file(), wx_to_std(dialog.GetPath()), boost::filesystem::copy_option::overwrite_if_exists);
}
- d->Destroy ();
}
#ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG
void config_file_changed ()
{
auto config = Config::instance();
- boost::filesystem::path new_file = wx_to_std(_config_file->GetPath());
- if (new_file == config->config_file()) {
+ auto const new_file = _config_file->path();
+ if (!new_file || *new_file == config->config_read_file()) {
return;
}
bool copy_and_link = true;
- if (boost::filesystem::exists(new_file)) {
- auto d = new ConfigMoveDialog (_panel, new_file);
- if (d->ShowModal() == wxID_OK) {
+ if (dcp::filesystem::exists(*new_file)) {
+ ConfigMoveDialog dialog(_panel, *new_file);
+ if (dialog.ShowModal() == wxID_OK) {
copy_and_link = false;
}
- d->Destroy ();
}
if (copy_and_link) {
config->write ();
- if (new_file != config->config_file()) {
- config->copy_and_link (new_file);
+ if (new_file != config->config_read_file()) {
+ config->copy_and_link(*new_file);
}
} else {
- config->link (new_file);
+ config->link(*new_file);
}
}
void cinemas_file_changed ()
{
- Config::instance()->set_cinemas_file (wx_to_std (_cinemas_file->GetPath ()));
+ if (auto path = _cinemas_file->path()) {
+ Config::instance()->set_cinemas_file(*path);
+ }
}
+ void default_add_file_location_changed()
+ {
+ Config::instance()->set_default_add_file_location(
+ _default_add_file_location->get().get_value_or(0) == 0 ? Config::DefaultAddFileLocation::SAME_AS_LAST_TIME : Config::DefaultAddFileLocation::SAME_AS_PROJECT
+ );
+ }
+
+ Choice* _default_add_file_location;
wxSpinCtrl* _master_encoding_threads;
wxSpinCtrl* _server_encoding_threads;
FilePickerCtrl* _config_file;
FilePickerCtrl* _cinemas_file;
#ifdef DCPOMATIC_HAVE_EBUR128_PATCHED_FFMPEG
- wxCheckBox* _analyse_ebur128;
+ CheckBox* _analyse_ebur128;
#endif
- wxCheckBox* _automatic_audio_analysis;
+ CheckBox* _automatic_audio_analysis;
};
: Page (panel_size, border)
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Defaults");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("defaults"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("defaults"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
#endif
table->Add (_directory, 1, wxEXPAND);
- add_label_to_sizer (table, _panel, _("Default container"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
- _container = new wxChoice (_panel, wxID_ANY);
- table->Add (_container);
-
add_label_to_sizer (table, _panel, _("Default content type"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_dcp_content_type = new wxChoice (_panel, wxID_ANY);
table->Add (_dcp_content_type);
_standard = new wxChoice (_panel, wxID_ANY);
table->Add (_standard);
+ _enable_audio_language = new CheckBox(_panel, _("Default audio language"));
+ table->Add(_enable_audio_language, 1, wxEXPAND | wxALIGN_CENTRE_VERTICAL);
+ _audio_language = new LanguageTagWidget(_panel, _("Default audio language to use for new DCPs"), Config::instance()->default_audio_language(), wxString("cmnr-Hant-"));
+ table->Add(_audio_language->sizer());
+
+ _enable_territory = new CheckBox(_panel, _("Default territory"));
+ table->Add(_enable_territory, 1, wxEXPAND | wxALIGN_CENTRE_VERTICAL);
+ _territory = new RegionSubtagWidget(_panel, _("Default territory to use for new DCPs"), Config::instance()->default_territory(), wxString("cmnr-Hant-"));
+ table->Add(_territory->sizer());
+
+ table->Add (_enable_metadata["facility"] = new CheckBox (_panel, _("Default facility")), 0, wxALIGN_CENTRE_VERTICAL);
+ table->Add (_metadata["facility"] = new wxTextCtrl (_panel, wxID_ANY, wxT("")), 0, wxEXPAND);
+
+ table->Add (_enable_metadata["studio"] = new CheckBox (_panel, _("Default studio")), 0, wxALIGN_CENTRE_VERTICAL);
+ table->Add (_metadata["studio"] = new wxTextCtrl (_panel, wxID_ANY, wxT("")), 0, wxEXPAND);
+
+ table->Add (_enable_metadata["chain"] = new CheckBox (_panel, _("Default chain")), 0, wxALIGN_CENTRE_VERTICAL);
+ table->Add (_metadata["chain"] = new wxTextCtrl (_panel, wxID_ANY, wxT("")), 0, wxEXPAND);
+
+ table->Add (_enable_metadata["distributor"] = new CheckBox (_panel, _("Default distributor")), 0, wxALIGN_CENTRE_VERTICAL);
+ table->Add (_metadata["distributor"] = new wxTextCtrl (_panel, wxID_ANY, wxT("")), 0, wxEXPAND);
+
add_label_to_sizer (table, _panel, _("Default KDM directory"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
#ifdef DCPOMATIC_USE_OWN_PICKER
_kdm_directory = new DirPickerCtrl (_panel);
#else
_kdm_directory = new wxDirPickerCtrl (_panel, wxDD_DIR_MUST_EXIST);
#endif
-
table->Add (_kdm_directory, 1, wxEXPAND);
+ add_label_to_sizer (table, _panel, _("Default KDM type"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+ _kdm_type = new KDMChoice (_panel);
+ table->Add (_kdm_type, 1, wxEXPAND);
+
+ add_label_to_sizer (table, _panel, _("Default KDM duration"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+ _kdm_duration = new wxSpinCtrl (_panel);
+ _kdm_duration_unit = new wxChoice (_panel, wxID_ANY);
+ auto kdm_duration_sizer = new wxBoxSizer (wxHORIZONTAL);
+ kdm_duration_sizer->Add (_kdm_duration, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
+ kdm_duration_sizer->Add (_kdm_duration_unit, 0, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
+ table->Add (kdm_duration_sizer, 1, wxEXPAND);
+
+ table->Add (_use_isdcf_name_by_default = new CheckBox(_panel, _("Use ISDCF name by default")), 0, wxALIGN_CENTRE_VERTICAL);
+
_still_length->SetRange (1, 3600);
_still_length->Bind (wxEVT_SPINCTRL, boost::bind (&DefaultsPage::still_length_changed, this));
_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this));
_kdm_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::kdm_directory_changed, this));
+ _kdm_type->Bind (wxEVT_CHOICE, boost::bind(&DefaultsPage::kdm_type_changed, this));
+ _kdm_duration_unit->Append (_("days"));
+ _kdm_duration_unit->Append (_("weeks"));
+ _kdm_duration_unit->Append (_("months"));
+ _kdm_duration_unit->Append (_("years"));
- for (auto i: Ratio::containers()) {
- _container->Append (std_to_wx(i->container_nickname()));
- }
+ _kdm_duration->Bind (wxEVT_SPINCTRL, boost::bind(&DefaultsPage::kdm_duration_changed, this));
+ _kdm_duration_unit->Bind (wxEVT_CHOICE, boost::bind(&DefaultsPage::kdm_duration_changed, this));
- _container->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::container_changed, this));
+ _use_isdcf_name_by_default->bind(&DefaultsPage::use_isdcf_name_by_default_changed, this);
for (auto i: DCPContentType::all()) {
_dcp_content_type->Append (std_to_wx (i->pretty_name ()));
_standard->Append (_("SMPTE"));
_standard->Append (_("Interop"));
_standard->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::standard_changed, this));
+
+ for (auto const& i: _enable_metadata) {
+ i.second->bind(&DefaultsPage::metadata_changed, this);
+ }
+
+ for (auto const& i: _metadata) {
+ i.second->Bind (wxEVT_TEXT, boost::bind(&DefaultsPage::metadata_changed, this));
+ }
+
+ _enable_audio_language->bind(&DefaultsPage::enable_audio_language_toggled, this);
+ _audio_language->Changed.connect(boost::bind(&DefaultsPage::audio_language_changed, this));
+
+ _enable_territory->bind(&DefaultsPage::enable_territory_toggled, this);
+ _territory->Changed.connect(boost::bind(&DefaultsPage::territory_changed, this));
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
- auto containers = Ratio::containers ();
- for (size_t i = 0; i < containers.size(); ++i) {
- if (containers[i] == config->default_container()) {
- _container->SetSelection (i);
- }
- }
-
auto const ct = DCPContentType::all ();
for (size_t i = 0; i < ct.size(); ++i) {
if (ct[i] == config->default_dcp_content_type()) {
checked_set (_still_length, config->default_still_length ());
_directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
_kdm_directory->SetPath (std_to_wx (config->default_kdm_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
+ _kdm_type->set (config->default_kdm_type());
+ checked_set (_use_isdcf_name_by_default, config->use_isdcf_name_by_default());
checked_set (_j2k_bandwidth, config->default_j2k_bandwidth() / 1000000);
_j2k_bandwidth->SetRange (50, config->maximum_j2k_bandwidth() / 1000000);
checked_set (_dcp_audio_channels, locale_convert<string> (config->default_dcp_audio_channels()));
checked_set (_audio_delay, config->default_audio_delay ());
checked_set (_standard, config->default_interop() ? 1 : 0);
+ auto dal = config->default_audio_language();
+ checked_set(_enable_audio_language, static_cast<bool>(dal));
+ checked_set(_audio_language, dal ? dal : boost::none);
+ auto dt = config->default_territory();
+ checked_set(_enable_territory, static_cast<bool>(dt));
+ checked_set(_territory, dt ? dt : boost::none);
+
+ auto metadata = config->default_metadata();
+
+ for (auto const& i: metadata) {
+ _enable_metadata[i.first]->SetValue(true);
+ checked_set (_metadata[i.first], i.second);
+ }
+
+ for (auto const& i: _enable_metadata) {
+ if (metadata.find(i.first) == metadata.end()) {
+ checked_set (i.second, false);
+ }
+ }
+
+ for (auto const& i: _metadata) {
+ if (metadata.find(i.first) == metadata.end()) {
+ checked_set (i.second, wxT(""));
+ }
+ }
+
+ checked_set (_kdm_duration, config->default_kdm_duration().duration);
+ switch (config->default_kdm_duration().unit) {
+ case RoughDuration::Unit::DAYS:
+ _kdm_duration->SetRange(1, 365);
+ checked_set (_kdm_duration_unit, 0);
+ break;
+ case RoughDuration::Unit::WEEKS:
+ _kdm_duration->SetRange(1, 52);
+ checked_set (_kdm_duration_unit, 1);
+ break;
+ case RoughDuration::Unit::MONTHS:
+ _kdm_duration->SetRange(1, 12);
+ checked_set (_kdm_duration_unit, 2);
+ break;
+ case RoughDuration::Unit::YEARS:
+ _kdm_duration->SetRange(1, 40);
+ checked_set (_kdm_duration_unit, 3);
+ break;
+ }
+
+ setup_sensitivity ();
+ }
+
+ void kdm_duration_changed ()
+ {
+ auto config = Config::instance();
+ auto duration = _kdm_duration->GetValue();
+ RoughDuration::Unit unit = RoughDuration::Unit::DAYS;
+ switch (_kdm_duration_unit->GetSelection()) {
+ case 0:
+ unit = RoughDuration::Unit::DAYS;
+ break;
+ case 1:
+ unit = RoughDuration::Unit::WEEKS;
+ break;
+ case 2:
+ unit = RoughDuration::Unit::MONTHS;
+ break;
+ case 3:
+ unit = RoughDuration::Unit::YEARS;
+ break;
+ }
+ config->set_default_kdm_duration (RoughDuration(duration, unit));
}
void j2k_bandwidth_changed ()
Config::instance()->set_default_kdm_directory (wx_to_std (_kdm_directory->GetPath ()));
}
- void still_length_changed ()
+ void kdm_type_changed ()
{
- Config::instance()->set_default_still_length (_still_length->GetValue ());
+ Config::instance()->set_default_kdm_type(_kdm_type->get());
}
- void container_changed ()
+ void use_isdcf_name_by_default_changed ()
{
- auto ratio = Ratio::containers ();
- Config::instance()->set_default_container (ratio[_container->GetSelection()]);
+ Config::instance()->set_use_isdcf_name_by_default (_use_isdcf_name_by_default->GetValue());
+ }
+
+ void still_length_changed ()
+ {
+ Config::instance()->set_default_still_length (_still_length->GetValue ());
}
void dcp_content_type_changed ()
Config::instance()->set_default_interop (_standard->GetSelection() == 1);
}
+ void metadata_changed ()
+ {
+ map<string, string> metadata;
+ for (auto const& i: _enable_metadata) {
+ if (i.second->GetValue()) {
+ metadata[i.first] = wx_to_std(_metadata[i.first]->GetValue());
+ }
+ }
+ Config::instance()->set_default_metadata (metadata);
+ setup_sensitivity ();
+ }
+
+ void enable_audio_language_toggled()
+ {
+ setup_sensitivity();
+ audio_language_changed();
+ }
+
+ void audio_language_changed()
+ {
+ if (_enable_audio_language->get()) {
+ Config::instance()->set_default_audio_language(_audio_language->get().get_value_or(dcp::LanguageTag("en-US")));
+ } else {
+ Config::instance()->unset_default_audio_language();
+ }
+ }
+
+ void enable_territory_toggled()
+ {
+ setup_sensitivity();
+ territory_changed();
+ }
+
+ void territory_changed()
+ {
+ if (_enable_territory->get()) {
+ Config::instance()->set_default_territory(_territory->get().get_value_or(dcp::LanguageTag::RegionSubtag("US")));
+ } else {
+ Config::instance()->unset_default_territory();
+ }
+ }
+
+ void setup_sensitivity ()
+ {
+ _audio_language->enable(_enable_audio_language->get());
+ _territory->enable(_enable_territory->get());
+ for (auto const& i: _enable_metadata) {
+ _metadata[i.first]->Enable(i.second->GetValue());
+ }
+ }
+
wxSpinCtrl* _j2k_bandwidth;
wxSpinCtrl* _audio_delay;
wxSpinCtrl* _still_length;
wxDirPickerCtrl* _directory;
wxDirPickerCtrl* _kdm_directory;
#endif
- wxChoice* _container;
+ KDMChoice* _kdm_type;
+ wxSpinCtrl* _kdm_duration;
+ wxChoice* _kdm_duration_unit;
+ CheckBox* _use_isdcf_name_by_default;
wxChoice* _dcp_content_type;
wxChoice* _dcp_audio_channels;
wxChoice* _standard;
+ CheckBox* _enable_audio_language;
+ LanguageTagWidget* _audio_language;
+ CheckBox* _enable_territory;
+ RegionSubtagWidget* _territory;
+ map<string, CheckBox*> _enable_metadata;
+ map<string, wxTextCtrl*> _metadata;
};
: Page (panel_size, border)
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Servers");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("servers"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("servers"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
_use_any_servers = new CheckBox (_panel, _("Search network for servers"));
_panel->GetSizer()->Add (_use_any_servers, 0, wxALL, _border);
columns,
boost::bind (&Config::servers, Config::instance()),
boost::bind (&Config::set_servers, Config::instance(), _1),
- boost::bind (&EncodingServersPage::server_column, this, _1)
+ boost::bind (&EncodingServersPage::server_column, this, _1),
+ EditableListTitle::INVISIBLE,
+ EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
);
_panel->GetSizer()->Add (_servers_list, 1, wxEXPAND | wxALL, _border);
- _use_any_servers->Bind (wxEVT_CHECKBOX, boost::bind(&EncodingServersPage::use_any_servers_changed, this));
+ _use_any_servers->bind(&EncodingServersPage::use_any_servers_changed, this);
}
- void config_changed ()
+ void config_changed () override
{
checked_set (_use_any_servers, Config::instance()->use_any_servers ());
_servers_list->refresh ();
return s;
}
- wxCheckBox* _use_any_servers;
+ CheckBox* _use_any_servers;
EditableList<string, ServerDialog>* _servers_list;
};
: Page (panel_size, border)
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("TMS");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("tms"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("tms"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
_upload = new CheckBox (_panel, _("Upload DCP to TMS after creation"));
_panel->GetSizer()->Add (_upload, 0, wxALL | wxEXPAND, _border);
_tms_protocol = new wxChoice (_panel, wxID_ANY);
table->Add (_tms_protocol, 1, wxEXPAND);
+ _tms_passive = new CheckBox(_panel, _("Passive mode"));
+ table->Add(_tms_passive, 1, wxEXPAND);
+ table->AddSpacer(0);
+
add_label_to_sizer (table, _panel, _("IP address"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_tms_ip = new wxTextCtrl (_panel, wxID_ANY);
table->Add (_tms_ip, 1, wxEXPAND);
_tms_protocol->Append (_("SCP (for AAM and Doremi)"));
_tms_protocol->Append (_("FTP (for Dolby)"));
- _upload->Bind (wxEVT_CHECKBOX, boost::bind(&TMSPage::upload_changed, this));
+ _upload->bind(&TMSPage::upload_changed, this);
_tms_protocol->Bind (wxEVT_CHOICE, boost::bind (&TMSPage::tms_protocol_changed, this));
+ _tms_passive->bind(&TMSPage::tms_passive_changed, this);
+
_tms_ip->Bind (wxEVT_TEXT, boost::bind (&TMSPage::tms_ip_changed, this));
_tms_path->Bind (wxEVT_TEXT, boost::bind (&TMSPage::tms_path_changed, this));
_tms_user->Bind (wxEVT_TEXT, boost::bind (&TMSPage::tms_user_changed, this));
_tms_password->Changed.connect (boost::bind (&TMSPage::tms_password_changed, this));
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
checked_set (_upload, config->upload_after_make_dcp());
checked_set (_tms_protocol, static_cast<int>(config->tms_protocol()));
+ checked_set(_tms_passive, config->tms_protocol() == FileTransferProtocol::FTP && config->tms_passive());
checked_set (_tms_ip, config->tms_ip ());
checked_set (_tms_path, config->tms_path ());
checked_set (_tms_user, config->tms_user ());
checked_set (_tms_password, config->tms_password ());
+
+ _tms_passive->Enable(config->tms_protocol() == FileTransferProtocol::FTP);
}
void upload_changed ()
Config::instance()->set_tms_protocol(static_cast<FileTransferProtocol>(_tms_protocol->GetSelection()));
}
+ void tms_passive_changed()
+ {
+ Config::instance()->set_tms_passive(_tms_passive->get());
+ }
+
void tms_ip_changed ()
{
Config::instance()->set_tms_ip (wx_to_std (_tms_ip->GetValue ()));
}
CheckBox* _upload;
+ CheckBox* _tms_passive;
wxChoice* _tms_protocol;
wxTextCtrl* _tms_ip;
wxTextCtrl* _tms_path;
: Page (panel_size, border)
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Email");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("email"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("email"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
_password = new PasswordEntry (_panel);
table->Add (_password->get_panel(), 1, wxEXPAND | wxALL);
+ table->AddSpacer (0);
+ _send_test_email = new Button (_panel, _("Send test email..."));
+ table->Add (_send_test_email);
+
_server->Bind (wxEVT_TEXT, boost::bind(&EmailPage::server_changed, this));
_port->Bind (wxEVT_SPINCTRL, boost::bind(&EmailPage::port_changed, this));
_protocol->Bind (wxEVT_CHOICE, boost::bind(&EmailPage::protocol_changed, this));
_user->Bind (wxEVT_TEXT, boost::bind(&EmailPage::user_changed, this));
_password->Changed.connect (boost::bind(&EmailPage::password_changed, this));
+ _send_test_email->Bind (wxEVT_BUTTON, boost::bind(&EmailPage::send_test_email_clicked, this));
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
Config::instance()->set_mail_password(_password->get());
}
+ void send_test_email_clicked ()
+ {
+ SendTestEmailDialog dialog(_panel);
+ if (dialog.ShowModal() != wxID_OK) {
+ return;
+ }
+
+ Emailer emailer(
+ wx_to_std(dialog.from()),
+ { wx_to_std(dialog.to()) },
+ wx_to_std(_("DCP-o-matic test email")),
+ wx_to_std(_("This is a test email from DCP-o-matic."))
+ );
+ auto config = Config::instance();
+ try {
+ emailer.send(config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
+ } catch (NetworkError& e) {
+ error_dialog(_panel, std_to_wx(e.summary()), std_to_wx(e.detail().get_value_or("")));
+ return;
+ } catch (std::exception& e) {
+ error_dialog(_panel, _("Test email sending failed."), std_to_wx(e.what()));
+ return;
+ } catch (...) {
+ error_dialog(_panel, _("Test email sending failed."));
+ return;
+ }
+ message_dialog(_panel, _("Test email sent."));
+ }
+
wxTextCtrl* _server;
wxSpinCtrl* _port;
wxChoice* _protocol;
wxTextCtrl* _user;
PasswordEntry* _password;
+ Button* _send_test_email;
};
#endif
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("KDM Email");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("kdm_email"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("kdm_email"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- 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, wxEXPAND | wxALL, _border);
+ _panel->GetSizer()->Add (table, 0, wxEXPAND | wxALL, _border);
add_label_to_sizer (table, _panel, _("Subject"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_subject = new wxTextCtrl (_panel, wxID_ANY);
bind (&Config::set_kdm_cc, Config::instance(), _1),
[] (string s, int) {
return s;
- });
+ },
+ EditableListTitle::VISIBLE,
+ EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
+ );
table->Add (_cc, 1, wxEXPAND | wxALL);
add_label_to_sizer (table, _panel, _("BCC address"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_reset_email->Bind (wxEVT_BUTTON, boost::bind (&KDMEmailPage::reset_email, this));
}
- void config_changed ()
+ void config_changed () override
{
- Config* config = Config::instance ();
+ auto config = Config::instance ();
checked_set (_subject, config->kdm_subject ());
checked_set (_from, config->kdm_from ());
#endif
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Notifications");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("notifications"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("notifications"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
- _panel->GetSizer()->Add (table, 1, wxEXPAND | wxALL, _border);
+ _panel->GetSizer()->Add (table, 0, wxEXPAND | wxALL, _border);
_enable_message_box = new CheckBox (_panel, _("Message box"));
table->Add (_enable_message_box, 1, wxEXPAND | wxALL);
bind (&Config::set_notification_cc, Config::instance(), _1),
[] (string s, int) {
return s;
- });
+ },
+ EditableListTitle::VISIBLE,
+ EditableListButton::NEW | EditableListButton::EDIT | EditableListButton::REMOVE
+ );
table->Add (_cc, 1, wxEXPAND | wxALL);
add_label_to_sizer (table, _panel, _("BCC address"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_cc->layout ();
- _enable_message_box->Bind (wxEVT_CHECKBOX, boost::bind (&NotificationsPage::type_changed, this, _enable_message_box, Config::MESSAGE_BOX));
- _enable_email->Bind (wxEVT_CHECKBOX, boost::bind (&NotificationsPage::type_changed, this, _enable_email, Config::EMAIL));
+ _enable_message_box->bind(&NotificationsPage::type_changed, this, _enable_message_box, Config::MESSAGE_BOX);
+ _enable_email->bind(&NotificationsPage::type_changed, this, _enable_email, Config::EMAIL);
_subject->Bind (wxEVT_TEXT, boost::bind (&NotificationsPage::notification_subject_changed, this));
_from->Bind (wxEVT_TEXT, boost::bind (&NotificationsPage::notification_from_changed, this));
_reset_email->Enable(s);
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
checked_set (_email, Config::instance()->notification_email());
}
- void type_changed (wxCheckBox* b, Config::Notification n)
+ void type_changed (CheckBox* b, Config::Notification n)
{
Config::instance()->set_notification(n, b->GetValue());
setup_sensitivity ();
}
- wxCheckBox* _enable_message_box;
- wxCheckBox* _enable_email;
+ CheckBox* _enable_message_box;
+ CheckBox* _enable_email;
wxTextCtrl* _subject;
wxTextCtrl* _from;
#endif
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Cover Sheet");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("cover_sheet"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("cover_sheet"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
_cover_sheet = new wxTextCtrl (_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (-1, 200), wxTE_MULTILINE);
_panel->GetSizer()->Add (_cover_sheet, 0, wxEXPAND | wxALL, _border);
_reset_cover_sheet->Bind (wxEVT_BUTTON, boost::bind (&CoverSheetPage::reset_cover_sheet, this));
}
- void config_changed ()
+ void config_changed () override
{
checked_set (_cover_sheet, Config::instance()->cover_sheet());
}
: Page (panel_size, border)
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Identifiers");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("identifiers"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("identifiers"), wxBITMAP_TYPE_PNG);
}
#endif
private:
- void setup ()
+ void setup () override
{
auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
_j2k_comment->Bind (wxEVT_TEXT, boost::bind(&IdentifiersPage::j2k_comment_changed, this));
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
checked_set (_issuer, config->dcp_issuer ());
};
+class NonStandardPage : public Page
+{
+public:
+ NonStandardPage(wxSize panel_size, int border)
+ : Page(panel_size, border)
+ {}
+
+ wxString GetName() const override
+ {
+ return _("Non-standard");
+ }
+
+#ifdef DCPOMATIC_OSX
+ wxBitmap GetLargeIcon() const override
+ {
+ return wxBitmap(icon_path("non_standard"), wxBITMAP_TYPE_PNG);
+ }
+#endif
+
+private:
+ void setup() override
+ {
+ 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);
+
+ {
+ add_label_to_sizer(table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+ auto s = new wxBoxSizer(wxHORIZONTAL);
+ _maximum_j2k_bandwidth = new wxSpinCtrl(_panel);
+ s->Add(_maximum_j2k_bandwidth, 1);
+ add_label_to_sizer(s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL);
+ table->Add(s, 1);
+ }
+
+ auto checkbox = [this, table](wxString name, CheckBox*& variable) {
+ variable = new CheckBox(_panel, name);
+ table->Add(variable, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+ table->AddSpacer(0);
+ };
+
+ checkbox(_("Allow any DCP frame rate"), _allow_any_dcp_frame_rate);
+
+ _allow_any_container = new CheckBox(_panel, _("Allow full-frame and non-standard container ratios"));
+ table->Add(_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+ auto restart = new StaticText(_panel, _("(restart DCP-o-matic to see all ratios)"));
+ auto font = restart->GetFont();
+ font.SetStyle(wxFONTSTYLE_ITALIC);
+ font.SetPointSize(font.GetPointSize() - 1);
+ restart->SetFont(font);
+ table->Add(restart, 1, wxALIGN_CENTRE_VERTICAL | wxBOTTOM, DCPOMATIC_CHECKBOX_BOTTOM_PAD);
+ restart->SetFont(font);
+
+ checkbox(_("Allow creation of DCPs with 96kHz audio"), _allow_96khz_audio);
+ checkbox(_("Allow mapping to all audio channels"), _use_all_audio_channels);
+ checkbox(_("Allow use of SMPTE Bv2.0"), _allow_smpte_bv20);
+
+ {
+ add_label_to_sizer(table, _panel, _("ISDCF name part length"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+ auto s = new wxBoxSizer(wxHORIZONTAL);
+ _isdcf_name_part_length = new wxSpinCtrl(_panel);
+ s->Add(_isdcf_name_part_length, 1);
+ table->Add(s, 1);
+ }
+
+ _maximum_j2k_bandwidth->SetRange(1, 1000);
+ _maximum_j2k_bandwidth->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::maximum_j2k_bandwidth_changed, this));
+ _allow_any_dcp_frame_rate->bind(&NonStandardPage::allow_any_dcp_frame_rate_changed, this);
+ _allow_any_container->bind(&NonStandardPage::allow_any_container_changed, this);
+ _allow_96khz_audio->bind(&NonStandardPage::allow_96khz_audio_changed, this);
+ _use_all_audio_channels->bind(&NonStandardPage::use_all_channels_changed, this);
+ _allow_smpte_bv20->bind(&NonStandardPage::allow_smpte_bv20_changed, this);
+ _isdcf_name_part_length->SetRange(1, 256);
+ _isdcf_name_part_length->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::isdcf_name_part_length_changed, this));
+ }
+
+ void config_changed() override
+ {
+ auto config = Config::instance();
+
+ checked_set(_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000);
+ 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(_allow_smpte_bv20, config->allow_smpte_bv20());
+ checked_set(_isdcf_name_part_length, config->isdcf_name_part_length());
+ }
+
+ void maximum_j2k_bandwidth_changed()
+ {
+ Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000);
+ }
+
+ void allow_any_dcp_frame_rate_changed()
+ {
+ Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue());
+ }
+
+ void allow_any_container_changed()
+ {
+ Config::instance()->set_allow_any_container(_allow_any_container->GetValue());
+ }
+
+ void allow_96khz_audio_changed()
+ {
+ 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 allow_smpte_bv20_changed()
+ {
+ Config::instance()->set_allow_smpte_bv20(_allow_smpte_bv20->GetValue());
+ }
+
+ void isdcf_name_part_length_changed()
+ {
+ Config::instance()->set_isdcf_name_part_length(_isdcf_name_part_length->GetValue());
+ }
+
+ wxSpinCtrl* _maximum_j2k_bandwidth = nullptr;
+ CheckBox* _allow_any_dcp_frame_rate = nullptr;
+ CheckBox* _allow_any_container = nullptr;
+ CheckBox* _allow_96khz_audio = nullptr;
+ CheckBox* _use_all_audio_channels = nullptr;
+ CheckBox* _allow_smpte_bv20 = nullptr;
+ wxSpinCtrl* _isdcf_name_part_length = nullptr;
+};
+
+
+
/** @class AdvancedPage
* @brief Advanced page of the preferences dialog.
*/
: Page (panel_size, border)
{}
- wxString GetName () const
+ wxString GetName () const override
{
return _("Advanced");
}
#ifdef DCPOMATIC_OSX
- wxBitmap GetLargeIcon () const
+ wxBitmap GetLargeIcon () const override
{
- return wxBitmap(bitmap_path("advanced"), wxBITMAP_TYPE_PNG);
+ return wxBitmap(icon_path("advanced"), wxBITMAP_TYPE_PNG);
}
#endif
table->Add (m, 0, flags, DCPOMATIC_SIZER_Y_GAP);
}
- void setup ()
+ void setup () override
{
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);
- {
- add_label_to_sizer (table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
- wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
- _maximum_j2k_bandwidth = new wxSpinCtrl (_panel);
- s->Add (_maximum_j2k_bandwidth, 1);
- add_label_to_sizer (s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL);
- table->Add (s, 1);
- }
-
add_label_to_sizer (table, _panel, _("Video display mode"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_video_display_mode = new wxChoice (_panel, wxID_ANY);
table->Add (_video_display_mode);
restart->SetFont (font);
table->AddSpacer (0);
- _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate"));
- table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxALL);
- table->AddSpacer (0);
-
- _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios"));
- table->Add (_allow_any_container, 1, wxEXPAND | wxALL);
- table->AddSpacer (0);
-
- restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to see all ratios)"), false);
- restart->SetFont (font);
- table->AddSpacer (0);
-
_show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors"));
- table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxALL);
+ table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
table->AddSpacer (0);
_only_servers_encode = new CheckBox (_panel, _("Only servers encode"));
- table->Add (_only_servers_encode, 1, wxEXPAND | wxALL);
+ table->Add (_only_servers_encode, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
table->AddSpacer (0);
{
align->Add (format, 0, wxTOP, 2);
table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
#else
- table->Add (format, 0, wxTOP | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
+ table->Add (format, 0, wxTOP | wxLEFT | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
#endif
dcp::NameFormat::Map titles;
titles['t'] = wx_to_std (_("type (cpl/pkl)"));
align->Add (format, 0, wxTOP, 2);
table->Add (align, 0, wxALIGN_RIGHT | wxRIGHT, DCPOMATIC_SIZER_GAP - 2);
#else
- table->Add (format, 0, wxTOP | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
+ table->Add (format, 0, wxTOP | wxLEFT | wxRIGHT | wxALIGN_TOP, DCPOMATIC_SIZER_GAP);
#endif
dcp::NameFormat::Map titles;
titles['t'] = wx_to_std (_("type (j2c/pcm/sub)"));
{
add_top_aligned_label_to_sizer (table, _panel, _("Log"));
- auto t = new wxBoxSizer (wxVERTICAL);
+ auto t = new wxFlexGridSizer (2);
_log_general = new CheckBox (_panel, _("General"));
t->Add (_log_general, 1, wxEXPAND | wxALL);
_log_warning = new CheckBox (_panel, _("Warnings"));
table->AddSpacer (0);
#endif
- _maximum_j2k_bandwidth->SetRange (1, 1000);
- _maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
_video_display_mode->Append (_("Simple (safer)"));
+#if wxCHECK_VERSION(3, 1, 0)
_video_display_mode->Append (_("OpenGL (faster)"));
+#endif
_video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this));
- _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));
- _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));
+ _show_experimental_audio_processors->bind(&AdvancedPage::show_experimental_audio_processors_changed, this);
+ _only_servers_encode->bind(&AdvancedPage::only_servers_encode_changed, this);
_frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this));
_dcp_metadata_filename_format->Changed.connect (boost::bind (&AdvancedPage::dcp_metadata_filename_format_changed, this));
_dcp_asset_filename_format->Changed.connect (boost::bind (&AdvancedPage::dcp_asset_filename_format_changed, this));
- _log_general->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_warning->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_error->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_timing->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_debug_threed->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_debug_encode->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_debug_email->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_debug_video_view->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_debug_player->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
- _log_debug_audio_analysis->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
+ _log_general->bind(&AdvancedPage::log_changed, this);
+ _log_warning->bind(&AdvancedPage::log_changed, this);
+ _log_error->bind(&AdvancedPage::log_changed, this);
+ _log_timing->bind(&AdvancedPage::log_changed, this);
+ _log_debug_threed->bind(&AdvancedPage::log_changed, this);
+ _log_debug_encode->bind(&AdvancedPage::log_changed, this);
+ _log_debug_email->bind(&AdvancedPage::log_changed, this);
+ _log_debug_video_view->bind(&AdvancedPage::log_changed, this);
+ _log_debug_player->bind(&AdvancedPage::log_changed, this);
+ _log_debug_audio_analysis->bind(&AdvancedPage::log_changed, this);
#ifdef DCPOMATIC_WINDOWS
- _win32_console->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::win32_console_changed, this));
+ _win32_console->bind(&AdvancedPage::win32_console_changed, this);
#endif
}
- void config_changed ()
+ void config_changed () override
{
auto config = Config::instance ();
- checked_set (_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000);
switch (config->video_view_type()) {
case Config::VIDEO_VIEW_SIMPLE:
checked_set (_video_display_mode, 0);
checked_set (_video_display_mode, 1);
break;
}
- checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ());
- checked_set (_allow_any_container, config->allow_any_container ());
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);
#endif
}
- void maximum_j2k_bandwidth_changed ()
- {
- Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000);
- }
-
void video_display_mode_changed ()
{
if (_video_display_mode->GetSelection() == 0) {
Config::instance()->set_frames_in_memory_multiplier(_frames_in_memory_multiplier->GetValue());
}
- void allow_any_dcp_frame_rate_changed ()
- {
- Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue());
- }
-
- void allow_any_container_changed ()
- {
- Config::instance()->set_allow_any_container(_allow_any_container->GetValue());
- }
-
void show_experimental_audio_processors_changed ()
{
Config::instance()->set_show_experimental_audio_processors(_show_experimental_audio_processors->GetValue());
}
#endif
- wxSpinCtrl* _maximum_j2k_bandwidth = nullptr;
wxChoice* _video_display_mode = nullptr;
wxSpinCtrl* _frames_in_memory_multiplier = nullptr;
- wxCheckBox* _allow_any_dcp_frame_rate = nullptr;
- wxCheckBox* _allow_any_container = nullptr;
- wxCheckBox* _show_experimental_audio_processors = nullptr;
- wxCheckBox* _only_servers_encode = nullptr;
+ CheckBox* _show_experimental_audio_processors = nullptr;
+ CheckBox* _only_servers_encode = nullptr;
NameFormatEditor* _dcp_metadata_filename_format = nullptr;
NameFormatEditor* _dcp_asset_filename_format = nullptr;
- wxCheckBox* _log_general = nullptr;
- wxCheckBox* _log_warning = nullptr;
- wxCheckBox* _log_error = nullptr;
- wxCheckBox* _log_timing = nullptr;
- wxCheckBox* _log_debug_threed = nullptr;
- wxCheckBox* _log_debug_encode = nullptr;
- wxCheckBox* _log_debug_email = nullptr;
- wxCheckBox* _log_debug_video_view = nullptr;
- wxCheckBox* _log_debug_player = nullptr;
- wxCheckBox* _log_debug_audio_analysis = nullptr;
+ CheckBox* _log_general = nullptr;
+ CheckBox* _log_warning = nullptr;
+ CheckBox* _log_error = nullptr;
+ CheckBox* _log_timing = nullptr;
+ CheckBox* _log_debug_threed = nullptr;
+ CheckBox* _log_debug_encode = nullptr;
+ CheckBox* _log_debug_email = nullptr;
+ CheckBox* _log_debug_video_view = nullptr;
+ CheckBox* _log_debug_player = nullptr;
+ CheckBox* _log_debug_audio_analysis = nullptr;
#ifdef DCPOMATIC_WINDOWS
- wxCheckBox* _win32_console = nullptr;
+ CheckBox* _win32_console = nullptr;
#endif
};
the containing window doesn't shrink too much when we select those panels.
This is obviously an unpleasant hack.
*/
- wxSize ps = wxSize (700, -1);
+ wxSize ps = wxSize(900, -1);
int const border = 16;
#else
wxSize ps = wxSize (-1, -1);
e->AddPage (new NotificationsPage (ps, border));
e->AddPage (new CoverSheetPage (ps, border));
e->AddPage (new IdentifiersPage (ps, border));
+ e->AddPage (new NonStandardPage (ps, border));
e->AddPage (new AdvancedPage (ps, border));
return e;
}