~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/interface/settings/optionspage_filetype.cpp

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
bool COptionsPageFiletype::LoadPage()
16
16
{
17
17
        bool failure = false;
18
 
        
 
18
 
19
19
        SetCheckFromOption(XRCID("ID_ASCIIWITHOUT"), OPTION_ASCIINOEXT, failure);
20
20
        SetCheckFromOption(XRCID("ID_ASCIIDOTFILE"), OPTION_ASCIIDOTFILE, failure);
21
21
 
25
25
        if (!FindWindow(XRCID("ID_EXTENSION")) || !FindWindow(XRCID("ID_ADD")) ||
26
26
                !FindWindow(XRCID("ID_REMOVE")) || !FindWindow(XRCID("ID_EXTENSIONS")) ||
27
27
                !FindWindow(XRCID("ID_TYPE_AUTO")) || !FindWindow(XRCID("ID_TYPE_ASCII")) ||
28
 
                !FindWindow(XRCID("ID_TYPE_BINARY"))) 
 
28
                !FindWindow(XRCID("ID_TYPE_BINARY")))
29
29
                return false;
30
30
 
31
31
        int mode = m_pOptions->GetOptionVal(OPTION_ASCIIBINARY);
39
39
        wxListCtrl* pListCtrl = XRCCTRL(*this, "ID_EXTENSIONS", wxListCtrl);
40
40
        pListCtrl->ClearAll();
41
41
        pListCtrl->InsertColumn(0, _T(""));
42
 
        
 
42
 
43
43
        wxString extensions = m_pOptions->GetOption(OPTION_ASCIIFILES);
44
44
        wxString ext;
45
45
        int pos = extensions.Find(_T("|"));
49
49
                {
50
50
                        if (ext != _T(""))
51
51
                        {
52
 
                                ext.Replace(_T("\\\\"), _T("\\")); 
 
52
                                ext.Replace(_T("\\\\"), _T("\\"));
53
53
                                pListCtrl->InsertItem(pListCtrl->GetItemCount(), ext);
54
54
                                ext = _T("");
55
55
                        }
57
57
                else if (extensions.c_str()[pos - 1] != '\\')
58
58
                {
59
59
                        ext += extensions.Left(pos);
60
 
                        ext.Replace(_T("\\\\"), _T("\\")); 
 
60
                        ext.Replace(_T("\\\\"), _T("\\"));
61
61
                        pListCtrl->InsertItem(pListCtrl->GetItemCount(), ext);
62
62
                        ext = _T("");
63
63
                }
69
69
                pos = extensions.Find(_T("|"));
70
70
        }
71
71
        ext += extensions;
72
 
        ext.Replace(_T("\\\\"), _T("\\")); 
 
72
        ext.Replace(_T("\\\\"), _T("\\"));
73
73
        pListCtrl->InsertItem(pListCtrl->GetItemCount(), ext);
74
 
        
 
74
 
75
75
        SetCtrlState();
76
76
 
77
77
        return true;