summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_viewmodebar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern/src/modern_viewmodebar.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 565d2edaeb..f51c72b5ed 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -208,17 +208,12 @@ static int FillDialog(HWND hwnd)
ListView_InsertColumn(GetDlgItem(hwnd, IDC_PROTOCOLS), 0, &lvc);
// fill protocols...
- int protoCount;
- PROTOACCOUNT **accs;
- Proto_EnumAccounts(&protoCount, &accs);
- {
- LVITEMA item = { 0 };
- item.mask = LVIF_TEXT;
- item.iItem = 1000;
- for (int i = 0; i < protoCount; i++) {
- item.pszText = accs[i]->szModuleName;
- SendMessageA(hwndList, LVM_INSERTITEMA, 0, (LPARAM)&item);
- }
+ LVITEMA item = { 0 };
+ item.mask = LVIF_TEXT;
+ item.iItem = 1000;
+ for (auto &pa : Accounts()) {
+ item.pszText = pa->szModuleName;
+ SendMessageA(hwndList, LVM_INSERTITEMA, 0, (LPARAM)&item);
}
ListView_SetColumnWidth(hwndList, 0, LVSCW_AUTOSIZE);