summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcitems.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-06 13:39:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-06 13:39:41 +0000
commitadf7fec7b1e32e93998e08cd41e9d84852db1758 (patch)
tree1dd6c4130659b3741cc693902c6fdc89518e8b81 /plugins/Clist_modern/src/modern_clcitems.cpp
parent56c24779dc455536c35866a65b25e4d729074b9d (diff)
clist_modern:
- fix for a nightmare with contsct renaming; - end of a crutch with caching 'Unknown contact'; - cache control over the contact's name went to the core; - code cleaning; - version bump; git-svn-id: http://svn.miranda-ng.org/main/trunk@16596 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcitems.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 087d67ab56..d9d6b31f46 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -137,7 +137,7 @@ void cli_FreeContact(ClcContact *p)
corecli.pfnFreeContact(p);
}
-void cli_FreeGroup(ClcGroup* group)
+void cli_FreeGroup(ClcGroup *group)
{
corecli.pfnFreeGroup(group);
ClearRowByIndexCache();
@@ -622,13 +622,13 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact)
void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact)
{
- if (hContact == INVALID_CONTACT_ID)
- corecli.pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID);
- else {
+ if (hContact != INVALID_CONTACT_ID) {
ClcCacheEntry *p = pcli->pfnGetCacheEntry(hContact);
if (p)
p->m_iStatus = 0;
}
+
+ corecli.pfnInvalidateDisplayNameCacheEntry(hContact);
}
void cli_SetContactCheckboxes(ClcContact *cc, int checked)
@@ -687,12 +687,14 @@ int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, Clc
TCHAR szGroupMask[256];
DWORD dwLocalMask;
ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(hContact);
- // always hide subcontacts (but show them on embedded contact lists)
+ // always hide subcontacts (but show them on embedded contact lists)
if (dat != NULL && dat->IsMetaContactsEnabled && db_mc_isSub(hContact))
return -1; //subcontact
+
if (pdnce && pdnce->m_bIsUnknown && dat != NULL && !dat->force_in_dialog)
return 1; //'Unknown Contact'
+
if (dat != NULL && dat->filterSearch && pdnce && pdnce->tszName) {
// search filtering
TCHAR *lowered_name = CharLowerW(NEWTSTR_ALLOCA(pdnce->tszName));