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

Method OnCacheMapSelect

src/Windows/ProfilesDialog.cpp:894–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

892}
893
894int ProfilesDialog::OnCacheMapSelect() {
895 HWND hListview = ::GetDlgItem(m_hPageCache, IDC_LIST_CACHE);
896 int selectedindex = ListView_GetNextItem(hListview, -1, LVNI_ALL|LVNI_SELECTED);
897 if (selectedindex == -1) {
898 ::SetDlgItemText(m_hPageCache, IDC_EDIT_CACHELOCAL, TEXT(""));
899 ::SetDlgItemTextA(m_hPageCache, IDC_EDIT_CACHEEXTERNAL, "");
900 } else {
901 FTPCache * cache = m_currentProfile->GetCache();
902 const PathMap & pathmap = cache->GetPathMap(selectedindex);
903 ::SetDlgItemText(m_hPageCache, IDC_EDIT_CACHELOCAL, pathmap.localpath);
904 ::SetDlgItemTextA(m_hPageCache, IDC_EDIT_CACHEEXTERNAL, pathmap.externalpath);
905 }
906 UpdateCacheMapSpinner();
907
908 return 0;
909}
910
911int ProfilesDialog::UpdateCacheMapSpinner() {
912 HWND hListview = ::GetDlgItem(m_hPageCache, IDC_LIST_CACHE);

Callers

nothing calls this directly

Calls 1

GetCacheMethod · 0.80

Tested by

no test coverage detected