| 39 | } |
| 40 | |
| 41 | INT_PTR SettingsDialog::OnInitDialog() { |
| 42 | const TCHAR * cachePath = m_ftpSettings->GetGlobalCachePath(); |
| 43 | |
| 44 | Edit_LimitText(::GetDlgItem(m_hwnd, IDC_EDIT_MASTERPASS), Encryption::KeySize); |
| 45 | |
| 46 | ::SetDlgItemText(m_hwnd, IDC_EDIT_CACHE, cachePath); |
| 47 | |
| 48 | if (!Encryption::IsDefaultKey()) { |
| 49 | char password[Encryption::KeySize+1]; |
| 50 | memcpy(password, Encryption::GetDefaultKey(), Encryption::KeySize); |
| 51 | password[Encryption::KeySize] = 0; |
| 52 | ::SetDlgItemTextA(m_hwnd, IDC_EDIT_MASTERPASS, password); |
| 53 | } |
| 54 | |
| 55 | Button_SetCheck(::GetDlgItem(m_hwnd, IDC_CHECK_CLEARCACHE), (m_ftpSettings->GetClearCache())?TRUE:FALSE); |
| 56 | Button_SetCheck(::GetDlgItem(m_hwnd, IDC_CHECK_CLEARNORECYCLE), (m_ftpSettings->GetClearCachePermanent())?TRUE:FALSE); |
| 57 | ::EnableWindow( ::GetDlgItem(m_hwnd, IDC_CHECK_CLEARNORECYCLE), (m_ftpSettings->GetClearCache()) ); |
| 58 | |
| 59 | return Dialog::OnInitDialog(); |
| 60 | } |
| 61 | |
| 62 | INT_PTR SettingsDialog::DlgMsgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { |
| 63 | bool doDefProc = false; |
nothing calls this directly
no test coverage detected