MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / OnInitDialog

Method OnInitDialog

src/Windows/SettingsDialog.cpp:41–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41INT_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
62INT_PTR SettingsDialog::DlgMsgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) {
63 bool doDefProc = false;

Callers

nothing calls this directly

Calls 3

GetGlobalCachePathMethod · 0.80
GetClearCacheMethod · 0.80

Tested by

no test coverage detected