| 892 | } |
| 893 | |
| 894 | int 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 | |
| 911 | int ProfilesDialog::UpdateCacheMapSpinner() { |
| 912 | HWND hListview = ::GetDlgItem(m_hPageCache, IDC_LIST_CACHE); |