source: filezilla/trunk/fuentes/src/interface/settings/optionspage_fileexists.cpp @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 3 years ago

First release to xenial

File size: 1.3 KB
Line 
1#include <filezilla.h>
2#include "../Options.h"
3#include "settingsdialog.h"
4#include "optionspage.h"
5#include "optionspage_fileexists.h"
6
7bool COptionsPageFileExists::LoadPage()
8{
9        bool failure = false;
10
11        int dlAction = m_pOptions->GetOptionVal(OPTION_FILEEXISTS_DOWNLOAD);
12        if (dlAction < 0 || dlAction >= CFileExistsNotification::ACTION_COUNT)
13                dlAction = 0;
14        SetChoice(XRCID("ID_DOWNLOAD_ACTION"), dlAction, failure);
15
16        int ulAction = m_pOptions->GetOptionVal(OPTION_FILEEXISTS_UPLOAD);
17        if (ulAction < 0 || ulAction >= CFileExistsNotification::ACTION_COUNT)
18                ulAction = 0;
19        SetChoice(XRCID("ID_UPLOAD_ACTION"), ulAction, failure);
20
21        SetCheck(XRCID("ID_ASCIIRESUME"), m_pOptions->GetOptionVal(OPTION_ASCIIRESUME) ? true : false, failure);
22
23        return !failure;
24}
25
26bool COptionsPageFileExists::SavePage()
27{
28        int dlAction = GetChoice(XRCID("ID_DOWNLOAD_ACTION"));
29        if (dlAction < 0 || dlAction >= CFileExistsNotification::ACTION_COUNT)
30                dlAction = 0;
31        m_pOptions->SetOption(OPTION_FILEEXISTS_DOWNLOAD, dlAction);
32
33        int ulAction = GetChoice(XRCID("ID_UPLOAD_ACTION"));
34        if (ulAction < 0 || ulAction >= CFileExistsNotification::ACTION_COUNT)
35                ulAction = 0;
36        m_pOptions->SetOption(OPTION_FILEEXISTS_UPLOAD, ulAction);
37
38        m_pOptions->SetOption(OPTION_ASCIIRESUME, GetCheck(XRCID("ID_ASCIIRESUME")));
39        return true;
40}
41
42bool COptionsPageFileExists::Validate()
43{
44        return true;
45}
Note: See TracBrowser for help on using the repository browser.