From 15c49e3fc4cf033fffbf79e9f68a0405d5a95d14 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 26 Sep 2019 22:15:57 +0300 Subject: Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it --- plugins/Clist_modern/src/modern_clc.cpp | 2 +- plugins/Clist_modern/src/modern_clcitems.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index e59f10c3fe..a9afcacfd1 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1308,7 +1308,7 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wPara flags = contact->flags; } Clist_DeleteItemFromTree(hwnd, wParam); - if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !g_plugin.getByte(wParam, "Hidden")) { + if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Clist_IsHidden(wParam)) { NMCLISTCONTROL nm; g_clistApi.pfnAddContactToTree(hwnd, dat, wParam, 1, 1); if (Clist_FindItem(hwnd, dat, wParam, &contact)) { diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index d9e9c35246..87a0c84cd1 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -326,7 +326,7 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact) pdnce->hContact = hContact; pdnce->szProto = GetContactProto(hContact); - pdnce->bIsHidden = g_plugin.getByte(hContact, "Hidden"); + pdnce->bIsHidden = Clist_IsHidden(hContact); pdnce->m_bIsSub = db_mc_isSub(hContact) != 0; pdnce->m_bNoHiddenOffline = g_plugin.getByte(hContact, "noOffline"); pdnce->IdleTS = db_get_dw(hContact, pdnce->szProto, "IdleTS", 0); @@ -396,7 +396,7 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly) int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) { - int dbHidden = g_plugin.getByte(hContact, "Hidden"); // default hidden state, always respect it. + int dbHidden = Clist_IsHidden(hContact); // default hidden state, always respect it. int filterResult = 1; int searchResult = 0; ClcCacheEntry *pdnce = Clist_GetCacheEntry(hContact); -- cgit v1.2.3