"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/interface/settings/optionspage_connection_ftp.cpp" between
FileZilla_3.48.0_src.tar.bz2 and FileZilla_3.48.1_src.tar.bz2

About: FileZilla is a fast and feature-rich cross-platform FTP, FTPS and SFTP client with an intuitive graphical user interface.

optionspage_connection_ftp.cpp  (FileZilla_3.48.0_src.tar.bz2):optionspage_connection_ftp.cpp  (FileZilla_3.48.1_src.tar.bz2)
#include <filezilla.h> #include <filezilla.h>
#include "../Options.h" #include "../Options.h"
#include "settingsdialog.h" #include "settingsdialog.h"
#include "optionspage.h" #include "optionspage.h"
#include "optionspage_connection_ftp.h" #include "optionspage_connection_ftp.h"
#include "../netconfwizard.h"
bool COptionsPageConnectionFTP::LoadPage() #include <wx/statbox.h>
struct COptionsPageConnectionFTP::impl final
{ {
bool failure = false; wxRadioButton* passive_{};
wxRadioButton* active_{};
wxCheckBox* fallback_{};
wxCheckBox* keepalive_{};
};
COptionsPageConnectionFTP::COptionsPageConnectionFTP()
: impl_(std::make_unique<impl>())
{
}
COptionsPageConnectionFTP::~COptionsPageConnectionFTP()
{
}
bool COptionsPageConnectionFTP::CreateControls(wxWindow* parent)
{
auto const& lay = m_pOwner->layout();
Create(parent);
auto main = lay.createFlex(1);
main->AddGrowableCol(0);
SetSizer(main);
{
auto [box, inner] = lay.createStatBox(main, _("Overview"), 1);
inner->Add(new wxStaticText(box, -1, _("For more detailed informa
tion about what these options do, please run the network configuration wizard.")
));
auto run = new wxButton(box, -1, _("&Run configuration wizard now
..."));
inner->Add(run);
run->Bind(wxEVT_BUTTON, [this](wxCommandEvent const&) {
CNetConfWizard wizard(GetParent(), m_pOptions, m_pOwner->
GetEngineContext());
if (!wizard.Load()) {
return;
}
if (wizard.Run()) {
ReloadSettings();
}
});
}
{
auto [box, inner] = lay.createStatBox(main, _("Transfer Mode"), 1
);
impl_->passive_ = new wxRadioButton(box, -1, _("Pa&ssive (recomme
nded)"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
inner->Add(impl_->passive_);
impl_->active_ = new wxRadioButton(box, -1, _("&Active"));
inner->Add(impl_->active_);
impl_->fallback_ = new wxCheckBox(box, -1, _("Allow &fall back to
other transfer mode on failure"));
inner->Add(impl_->fallback_);
inner->Add(new wxStaticText(box, -1, _("If you have problems to r
etrieve directory listings or to transfer files, try to change the default trans
fer mode.")));
}
{
auto [box, inner] = lay.createStatBox(main, _("FTP Keep-alive"),
1);
impl_->keepalive_ = new wxCheckBox(box, -1, _("Send FTP &keep-ali
ve commands"));
inner->Add(impl_->keepalive_);
inner->Add(new wxStaticText(box, -1, _("A proper server does not
require this. Contact the server administrator if you need this.")));
}
return true;
}
bool COptionsPageConnectionFTP::LoadPage()
{
const bool use_pasv = m_pOptions->GetOptionVal(OPTION_USEPASV) != 0; const bool use_pasv = m_pOptions->GetOptionVal(OPTION_USEPASV) != 0;
SetRCheck(XRCID("ID_PASSIVE"), use_pasv, failure); impl_->passive_->SetValue(use_pasv);
SetRCheck(XRCID("ID_ACTIVE"), !use_pasv, failure); impl_->active_->SetValue(!use_pasv);
SetCheckFromOption(XRCID("ID_FALLBACK"), OPTION_ALLOW_TRANSFERMODEFALLBAC impl_->fallback_->SetValue(m_pOptions->GetOptionVal(OPTION_ALLOW_TRANSFER
K, failure); MODEFALLBACK) != 0);
SetCheckFromOption(XRCID("ID_USEKEEPALIVE"), OPTION_FTP_SENDKEEPALIVE, fa impl_->keepalive_->SetValue(m_pOptions->GetOptionVal(OPTION_FTP_SENDKEEPA
ilure); LIVE) != 0);
return !failure; return true;
} }
bool COptionsPageConnectionFTP::SavePage() bool COptionsPageConnectionFTP::SavePage()
{ {
m_pOptions->SetOption(OPTION_USEPASV, GetRCheck(XRCID("ID_PASSIVE")) ? 1 m_pOptions->SetOption(OPTION_USEPASV, impl_->passive_->GetValue() ? 1 : 0
: 0); );
SetOptionFromCheck(XRCID("ID_FALLBACK"), OPTION_ALLOW_TRANSFERMODEFALLBAC m_pOptions->SetOption(OPTION_ALLOW_TRANSFERMODEFALLBACK, impl_->fallback_
K); ? 1 : 0);
SetOptionFromCheck(XRCID("ID_USEKEEPALIVE"), OPTION_FTP_SENDKEEPALIVE); m_pOptions->SetOption(OPTION_FTP_SENDKEEPALIVE, impl_->keepalive_ ? 1 : 0
);
return true; return true;
} }
 End of changes. 6 change blocks. 
14 lines changed or deleted 88 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)