diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-20 12:34:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-20 12:34:27 +0300 |
commit | 6b0b43a8f98c6899f67dc62f9c8b765014f37fda (patch) | |
tree | 06aebd6c46fcc9a627589666e47c2ccbf5dfe822 /plugins/Clist_modern | |
parent | 61d558a55ba6ff52e1276bbd98644536af066bf2 (diff) |
Clist_Modern: very strange manual icon's visibility checker replaced with the core one
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index b715f28773..30bb55bc94 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -283,17 +283,18 @@ int GetGoodAccNum(bool *bDiffers, bool *bConn) WORD s = 0;
BYTE d = 0;
for (i = AccNum, AccNum = 0; i--;) {
- if (!acc[i]->bIsVirtual && acc[i]->bIsVisible && !acc[i]->bDynDisabled && acc[i]->ppro) {
+ PROTOACCOUNT *pa = acc[i];
+ if (!pa->bIsVirtual && pa->bIsVisible && !pa->bDynDisabled && pa->ppro) {
AccNum++;
if (!d) {
- s = acc[i]->ppro->m_iStatus;
+ s = pa->ppro->m_iStatus;
d = 1;
}
- else if (s != acc[i]->ppro->m_iStatus)
+ else if (s != pa->ppro->m_iStatus)
d = 2;
if (bConn)
- if (IsStatusConnecting(acc[i]->ppro->m_iStatus))
+ if (IsStatusConnecting(pa->ppro->m_iStatus))
*bConn = TRUE;
}
}
@@ -375,12 +376,13 @@ int cliTrayIconInit(HWND hwnd) case TRAY_ICON_MODE_ALL:
PROTOACCOUNT **acc;
- int AccNum, i;
+ int AccNum;
Proto_EnumAccounts(&AccNum, &acc);
- for (i = AccNum; i--;) {
- if (!acc[i]->bIsVirtual && acc[i]->bIsVisible && !acc[i]->bDynDisabled && acc[i]->ppro)
- pcli->pfnTrayIconAdd(hwnd, acc[i]->szModuleName, nullptr, acc[i]->ppro->m_iStatus);
+ for (int i = AccNum; i--;) {
+ PROTOACCOUNT *pa = acc[i];
+ if (pcli->pfnGetProtocolVisibility(pa->szModuleName) && pa->ppro != nullptr)
+ pcli->pfnTrayIconAdd(hwnd, pa->szModuleName, nullptr, pa->ppro->m_iStatus);
}
break;
}
|