/*
- 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
#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"
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)
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
_isdcf_metadata_button = new wxButton (panel, wxID_ANY, _("Edit..."));
table->Add (_isdcf_metadata_button);
- add_label_to_sizer (table, panel, _("Default scale to"), true);
- _scale = new wxChoice (panel, wxID_ANY);
- table->Add (_scale);
-
add_label_to_sizer (table, panel, _("Default container"), true);
_container = new wxChoice (panel, wxID_ANY);
table->Add (_container);
_isdcf_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DefaultsPage::edit_isdcf_metadata_clicked, this, parent));
- vector<VideoContentScale> scales = VideoContentScale::all ();
- for (size_t i = 0; i < scales.size(); ++i) {
- _scale->Append (std_to_wx (scales[i].name ()));
- if (scales[i] == config->default_scale ()) {
- _scale->SetSelection (i);
- }
- }
-
vector<Ratio const *> ratios = Ratio::all ();
for (size_t i = 0; i < ratios.size(); ++i) {
_container->Append (std_to_wx (ratios[i]->nickname ()));
}
}
- _scale->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::scale_changed, this));
_container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::container_changed, this));
vector<DCPContentType const *> const ct = DCPContentType::all ();
_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);
Config::instance()->set_default_still_length (_still_length->GetValue ());
}
- void scale_changed ()
- {
- vector<VideoContentScale> scale = VideoContentScale::all ();
- Config::instance()->set_default_scale (scale[_scale->GetSelection()]);
- }
-
void container_changed ()
{
vector<Ratio const *> ratio = Ratio::all ();
#else
wxDirPickerCtrl* _directory;
#endif
- wxChoice* _scale;
wxChoice* _container;
wxChoice* _dcp_content_type;
wxTextCtrl* _issuer;
+
+ boost::signals2::scoped_connection _config_connection;
};
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
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
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
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
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)
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 ());