diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-26 22:15:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-26 22:15:57 +0300 |
commit | 15c49e3fc4cf033fffbf79e9f68a0405d5a95d14 (patch) | |
tree | 3ba342e3e8645156102d3c5f3f9a1b5dafe4c22c /plugins/Clist_modern/src | |
parent | d095047014348c9e8dd72a72dc59b2abd22bbf9c (diff) |
Clist_IsHidden / Clist_HideContact - two helpers to hide CList/Hidden variable and unify access to it
Diffstat (limited to 'plugins/Clist_modern/src')
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcitems.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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);
|