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

Method LoadProfiles

src/Windows/ProfilesDialog.cpp:630–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630int ProfilesDialog::LoadProfiles() {
631 HWND hListProfile = ::GetDlgItem(m_hwnd, IDC_LIST_PROFILES);
632
633 ListBox_ResetContent(hListProfile);
634
635 for(size_t i = 0; i < m_profiles->size(); i++) {
636 int index = ListBox_AddString(hListProfile, m_profiles->at(i)->GetName());
637 if (index == LB_ERR || index == LB_ERRSPACE)
638 return -1;
639 ListBox_SetItemData(hListProfile, index, m_profiles->at(i));
640 if (m_currentProfile == m_profiles->at(i)) {
641 ListBox_SetCurSel(hListProfile, index);
642 }
643 }
644
645 return 0;
646}
647
648int ProfilesDialog::OnSelectProfile(FTPProfile * profile) {
649 if (profile == m_currentProfile && profile != NULL)

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected