diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-11-01 20:58:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-11-01 20:58:10 +0100 |
| commit | 3555fc10b3d7872f202c92ca14e35a4bfbc58e65 (patch) | |
| tree | f6bb59ebb6402659cce6c9785884c695c11da213 /src/wx | |
| parent | 760f48d1dbf639430704377b6b657fb4b88f1390 (diff) | |
Add passive mode option to TMS upload.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/full_config_dialog.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index 1aeacd3ca..eab88e0fa 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -696,6 +696,10 @@ private: _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); @@ -717,6 +721,8 @@ private: _upload->Bind (wxEVT_CHECKBOX, boost::bind(&TMSPage::upload_changed, this)); _tms_protocol->Bind (wxEVT_CHOICE, boost::bind (&TMSPage::tms_protocol_changed, this)); + _tms_passive->bind(boost::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)); @@ -729,10 +735,13 @@ private: 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 () @@ -745,6 +754,11 @@ private: 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 ())); @@ -766,6 +780,7 @@ private: } CheckBox* _upload; + CheckBox* _tms_passive; wxChoice* _tms_protocol; wxTextCtrl* _tms_ip; wxTextCtrl* _tms_path; |
