diff options
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 13 |
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;
|