| 909 | } |
| 910 | |
| 911 | int ProfilesDialog::UpdateCacheMapSpinner() { |
| 912 | HWND hListview = ::GetDlgItem(m_hPageCache, IDC_LIST_CACHE); |
| 913 | HWND hSpin = ::GetDlgItem(m_hPageCache, IDC_SPIN_CACHE); |
| 914 | FTPCache * cache = m_currentProfile->GetCache(); |
| 915 | int count = cache->GetPathMapCount(); |
| 916 | |
| 917 | int selectedindex = ListView_GetNextItem(hListview, -1, LVNI_ALL|LVNI_SELECTED); |
| 918 | if (selectedindex == -1) { |
| 919 | ::SendMessage(hSpin, UDM_SETRANGE, 0, MAKELPARAM(0,0) ); |
| 920 | ::SendMessage(hSpin, UDM_SETPOS, 0, 0); |
| 921 | |
| 922 | } else { |
| 923 | ::SendMessage(hSpin, UDM_SETRANGE, 0, MAKELPARAM(0,count-1) ); |
| 924 | ::SendMessage(hSpin, UDM_SETPOS, 0, selectedindex ); |
| 925 | } |
| 926 | return 0; |
| 927 | } |
nothing calls this directly
no test coverage detected