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

Method UpdateCacheMapSpinner

src/Windows/ProfilesDialog.cpp:911–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

909}
910
911int 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}

Callers

nothing calls this directly

Calls 2

GetCacheMethod · 0.80
GetPathMapCountMethod · 0.80

Tested by

no test coverage detected