diff options
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r-- | plugins/SeenPlugin/src/options.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 00f5eaf808..4b4882d5d6 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -287,17 +287,13 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM tvis.item.mask = TVIF_TEXT | TVIF_HANDLE | TVIF_STATE | TVIF_PARAM;
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- PROTOACCOUNT **protos;
- int numberOfProtocols;
- Proto_EnumAccounts(&numberOfProtocols, &protos);
-
- for (int i = 0; i < numberOfProtocols; i++) {
- if (CallProtoService(protos[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
+ for (auto &pa : Accounts()) {
+ if (CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
continue;
- tvis.item.pszText = protos[i]->tszAccountName;
- tvis.item.lParam = (LPARAM)mir_strdup(protos[i]->szModuleName);
- tvis.item.state = INDEXTOSTATEIMAGEMASK(IsWatchedProtocol(protos[i]->szModuleName) + 1);
+ tvis.item.pszText = pa->tszAccountName;
+ tvis.item.lParam = (LPARAM)mir_strdup(pa->szModuleName);
+ tvis.item.state = INDEXTOSTATEIMAGEMASK(IsWatchedProtocol(pa->szModuleName) + 1);
TreeView_InsertItem(GetDlgItem(hdlg, IDC_PROTOCOLLIST), &tvis);
}
}
|