summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-07 14:32:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-07 14:32:51 +0300
commit2c89ab98b84a92c0386700d6911be46ad18edc50 (patch)
treec10a72e0578510d97d9e58b1efcaab8f8076197d /plugins/Clist_modern/src
parent609c3041668b36bc6abfa9511aa4e197bf0060ff (diff)
finally that perversion with double protocol caching in clist died
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 2e553b55f0..852998e235 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -84,20 +84,19 @@ INT_PTR CListTray_GetGlobalStatus(WPARAM, LPARAM)
int connectingCount = 0;
g_bMultiConnectionMode = false;
- for (int i = 0; i < pcli->hClcProtoCount; i++) {
- ClcProtoStatus &p = pcli->clcProto[i];
- if (!Clist_GetProtocolVisibility(p.szProto))
+ for (auto &it : *pcli->menuProtos) {
+ if (!Clist_GetProtocolVisibility(it->szProto))
continue;
- if (IsStatusConnecting(p.dwStatus)) {
+ if (IsStatusConnecting(it->iStatus)) {
connectingCount++;
if (connectingCount == 1)
- g_szConnectingProto = p.szProto;
+ g_szConnectingProto = it->szProto;
else
g_bMultiConnectionMode = true;
}
- else if (GetStatusVal(p.dwStatus) > GetStatusVal(curstatus))
- curstatus = p.dwStatus;
+ else if (GetStatusVal(it->iStatus) > GetStatusVal(curstatus))
+ curstatus = it->iStatus;
}
return curstatus ? curstatus : ID_STATUS_OFFLINE;