diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-03 16:30:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-03 16:30:25 +0300 |
commit | 9613f96e6a6f96ad02a0fc926054132811ae2bb1 (patch) | |
tree | f8fe94a3efe7598a2af926f264d354f7a08fb943 /plugins/Msg_Export/src/options.cpp | |
parent | 2f880bda3aa2d8817ce43481df9d99b12ed82a58 (diff) |
Accounts() : iterator for accounts
Diffstat (limited to 'plugins/Msg_Export/src/options.cpp')
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index 7dff1cf799..70da9b568c 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -1134,17 +1134,13 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts2(HWND hwndDlg, UINT msg, WPARAM wPa ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_TICK));
ListView_SetImageList(hMapUser, hIml, LVSIL_SMALL);
- PROTOACCOUNT **proto;
- int nCount;
- Proto_EnumAccounts(&nCount, &proto);
-
LVITEMA sItem = { 0 };
sItem.mask = LVIF_TEXT | LVIF_IMAGE;
char szTemp[500];
- for (int i = 0; i < nCount; i++) {
- mir_snprintf(szTemp, "DisableProt_%s", proto[i]->szModuleName);
- sItem.pszText = proto[i]->szModuleName;
+ for (auto &pa : Accounts()) {
+ mir_snprintf(szTemp, "DisableProt_%s", pa->szModuleName);
+ sItem.pszText = pa->szModuleName;
sItem.iImage = db_get_b(NULL, MODULE, szTemp, 1);
::SendMessage(hMapUser, LVM_INSERTITEMA, 0, (LPARAM)&sItem);
sItem.iItem++;
|