1 | #include "FileZilla.h"
|
---|
2 | #include "Options.h"
|
---|
3 | #include "settingsdialog.h"
|
---|
4 | #include "optionspage.h"
|
---|
5 | #include "optionspage_connection_ftp.h"
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Description : Load the current FTP Settings and show it in the Dialogbox
|
---|
9 | * Date : 19.02.2008
|
---|
10 | */
|
---|
11 |
|
---|
12 | bool COptionsPageConnectionFTP::LoadPage()
|
---|
13 | {
|
---|
14 | bool failure = false;
|
---|
15 | SetRCheck(XRCID("ID_PASSIVE"), m_pOptions->GetOptionVal(OPTION_USEPASV) != 0, failure);
|
---|
16 | SetRCheck(XRCID("ID_ACTIVE"), m_pOptions->GetOptionVal(OPTION_USEPASV) == 0, failure);
|
---|
17 | SetCheck(XRCID("ID_FALLBACK"), m_pOptions->GetOptionVal(OPTION_ALLOW_TRANSFERMODEFALLBACK) != 0, failure);
|
---|
18 | SetCheck(XRCID("ID_USEKEEPALIVE"), m_pOptions->GetOptionVal(OPTION_FTP_SENDKEEPALIVE) != 0, failure);
|
---|
19 | return !failure;
|
---|
20 | }
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Description : Save the current FTP Settings.
|
---|
24 | * Date : 19.02.2008
|
---|
25 | */
|
---|
26 |
|
---|
27 | bool COptionsPageConnectionFTP::SavePage()
|
---|
28 | {
|
---|
29 | m_pOptions->SetOption(OPTION_USEPASV, GetRCheck(XRCID("ID_PASSIVE")) ? 1 : 0);
|
---|
30 | m_pOptions->SetOption(OPTION_ALLOW_TRANSFERMODEFALLBACK, GetCheck(XRCID("ID_FALLBACK")) ? 1 : 0);
|
---|
31 | m_pOptions->SetOption(OPTION_FTP_SENDKEEPALIVE, GetCheck(XRCID("ID_USEKEEPALIVE")) ? 1 : 0);
|
---|
32 | return true;
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|