summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-06-08 18:21:37 +0200
committerCarl Hetherington <cth@carlh.net>2020-06-08 18:21:37 +0200
commitd1957e43ef4a3966e35b9f28b8faf96e925d2310 (patch)
tree6f71f8d11e1496d504df4d547455528c71bf3618 /src/wx
parentf330799459f44d031dc711b947dd2c0cc5a015a3 (diff)
Move upload-DCP-to-TMS button to preferences.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/dcp_panel.cc22
-rw-r--r--src/wx/dcp_panel.h2
-rw-r--r--src/wx/full_config_dialog.cc23
3 files changed, 11 insertions, 36 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index 4472a14bf..0841ad399 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -111,8 +111,6 @@ DCPPanel::DCPPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> v
_standard_label = create_label (_panel, _("Standard"), true);
_standard = new wxChoice (_panel, wxID_ANY);
- _upload_after_make_dcp = new CheckBox (_panel, _("Upload DCP to TMS after it is made"));
-
_markers = new Button (_panel, _("Markers..."));
_metadata = new Button (_panel, _("Metadata..."));
@@ -131,7 +129,6 @@ DCPPanel::DCPPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> v
_reel_type->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::reel_type_changed, this));
_reel_length->Bind (wxEVT_SPINCTRL, boost::bind (&DCPPanel::reel_length_changed, this));
_standard->Bind (wxEVT_CHOICE, boost::bind (&DCPPanel::standard_changed, this));
- _upload_after_make_dcp->Bind (wxEVT_CHECKBOX, boost::bind (&DCPPanel::upload_after_make_dcp_changed, this));
_markers->Bind (wxEVT_BUTTON, boost::bind (&DCPPanel::markers_clicked, this));
_metadata->Bind (wxEVT_BUTTON, boost::bind (&DCPPanel::metadata_clicked, this));
@@ -205,7 +202,6 @@ DCPPanel::add_to_grid ()
_reel_length_gb_label->Show (full);
_standard_label->Show (full);
_standard->Show (full);
- _upload_after_make_dcp->Show (full);
_markers->Show (full);
_metadata->Show (full);
_reencode_j2k->Show (full);
@@ -229,9 +225,6 @@ DCPPanel::add_to_grid ()
_grid->Add (_standard, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
++r;
- _grid->Add (_upload_after_make_dcp, wxGBPosition (r, 0), wxGBSpan (1, 2));
- ++r;
-
wxBoxSizer* extra = new wxBoxSizer (wxHORIZONTAL);
extra->Add (_markers, 1, wxRIGHT, DCPOMATIC_SIZER_X_GAP);
extra->Add (_metadata, 1, wxRIGHT, DCPOMATIC_SIZER_X_GAP);
@@ -328,16 +321,6 @@ DCPPanel::standard_changed ()
}
void
-DCPPanel::upload_after_make_dcp_changed ()
-{
- if (!_film) {
- return;
- }
-
- _film->set_upload_after_make_dcp (_upload_after_make_dcp->GetValue ());
-}
-
-void
DCPPanel::markers_clicked ()
{
if (_markers_dialog) {
@@ -466,9 +449,6 @@ DCPPanel::film_changed (int p)
case Film::REEL_LENGTH:
checked_set (_reel_length, _film->reel_length() / 1000000000LL);
break;
- case Film::UPLOAD_AFTER_MAKE_DCP:
- checked_set (_upload_after_make_dcp, _film->upload_after_make_dcp ());
- break;
case Film::CONTENT:
setup_dcp_name ();
break;
@@ -589,7 +569,6 @@ DCPPanel::set_film (shared_ptr<Film> film)
film_changed (Film::AUDIO_PROCESSOR);
film_changed (Film::REEL_TYPE);
film_changed (Film::REEL_LENGTH);
- film_changed (Film::UPLOAD_AFTER_MAKE_DCP);
film_changed (Film::REENCODE_J2K);
set_general_sensitivity(static_cast<bool>(_film));
@@ -613,7 +592,6 @@ DCPPanel::setup_sensitivity ()
_encrypted->Enable (_generally_sensitive);
_reel_type->Enable (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->references_dcp_audio());
_reel_length->Enable (_generally_sensitive && _film && _film->reel_type() == REELTYPE_BY_LENGTH);
- _upload_after_make_dcp->Enable (_generally_sensitive);
_markers->Enable (_generally_sensitive && _film && !_film->interop());
_metadata->Enable (_generally_sensitive);
_frame_rate_choice->Enable (_generally_sensitive && _film && !_film->references_dcp_video());
diff --git a/src/wx/dcp_panel.h b/src/wx/dcp_panel.h
index 258471ffd..7a7d13897 100644
--- a/src/wx/dcp_panel.h
+++ b/src/wx/dcp_panel.h
@@ -77,7 +77,6 @@ private:
void show_audio_clicked ();
void reel_type_changed ();
void reel_length_changed ();
- void upload_after_make_dcp_changed ();
void markers_clicked ();
void metadata_clicked ();
void reencode_j2k_changed ();
@@ -143,7 +142,6 @@ private:
wxStaticText* _reel_length_label;
wxStaticText* _reel_length_gb_label;
wxSpinCtrl* _reel_length;
- wxCheckBox* _upload_after_make_dcp;
wxButton* _markers;
wxButton* _metadata;
wxSizer* _audio_panel_sizer;
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc
index a371690bd..ab3dc0800 100644
--- a/src/wx/full_config_dialog.cc
+++ b/src/wx/full_config_dialog.cc
@@ -379,9 +379,6 @@ private:
table->Add (_kdm_directory, 1, wxEXPAND);
- _upload_after_make_dcp = new CheckBox (_panel, _("Default to enabling upload of DCP to TMS"));
- table->Add (_upload_after_make_dcp, 1, wxEXPAND);
-
_still_length->SetRange (1, 3600);
_still_length->Bind (wxEVT_SPINCTRL, boost::bind (&DefaultsPage::still_length_changed, this));
@@ -414,8 +411,6 @@ private:
_standard->Append (_("SMPTE"));
_standard->Append (_("Interop"));
_standard->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::standard_changed, this));
-
- _upload_after_make_dcp->Bind (wxEVT_CHECKBOX, boost::bind (&DefaultsPage::upload_after_make_dcp_changed, this));
}
void config_changed ()
@@ -444,7 +439,6 @@ private:
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);
- checked_set (_upload_after_make_dcp, config->default_upload_after_make_dcp());
}
void j2k_bandwidth_changed ()
@@ -507,11 +501,6 @@ private:
Config::instance()->set_default_interop (_standard->GetSelection() == 1);
}
- void upload_after_make_dcp_changed ()
- {
- Config::instance()->set_default_upload_after_make_dcp (_upload_after_make_dcp->GetValue ());
- }
-
wxSpinCtrl* _j2k_bandwidth;
wxSpinCtrl* _audio_delay;
wxButton* _isdcf_metadata_button;
@@ -527,7 +516,6 @@ private:
wxChoice* _dcp_content_type;
wxChoice* _dcp_audio_channels;
wxChoice* _standard;
- wxCheckBox* _upload_after_make_dcp;
};
class EncodingServersPage : public StandardPage
@@ -612,6 +600,9 @@ public:
private:
void setup ()
{
+ _upload = new CheckBox (_panel, _("Upload DCP to TMS after creation"));
+ _panel->GetSizer()->Add (_upload, 0, wxALL | wxEXPAND, _border);
+
wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
table->AddGrowableCol (1, 1);
_panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
@@ -639,6 +630,7 @@ private:
_tms_protocol->Append (_("SCP (for AAM and Doremi)"));
_tms_protocol->Append (_("FTP (for Dolby)"));
+ _upload->Bind (wxEVT_CHECKBOX, boost::bind(&TMSPage::upload_changed, this));
_tms_protocol->Bind (wxEVT_CHOICE, boost::bind (&TMSPage::tms_protocol_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));
@@ -650,6 +642,7 @@ private:
{
Config* config = Config::instance ();
+ checked_set (_upload, config->upload_after_make_dcp());
checked_set (_tms_protocol, config->tms_protocol ());
checked_set (_tms_ip, config->tms_ip ());
checked_set (_tms_path, config->tms_path ());
@@ -657,6 +650,11 @@ private:
checked_set (_tms_password, config->tms_password ());
}
+ void upload_changed ()
+ {
+ Config::instance()->set_upload_after_make_dcp (_upload->GetValue());
+ }
+
void tms_protocol_changed ()
{
Config::instance()->set_tms_protocol(static_cast<FileTransferProtocol>(_tms_protocol->GetSelection()));
@@ -682,6 +680,7 @@ private:
Config::instance()->set_tms_password (_tms_password->get());
}
+ CheckBox* _upload;
wxChoice* _tms_protocol;
wxTextCtrl* _tms_ip;
wxTextCtrl* _tms_path;