diff options
author | George Hazan <george.hazan@gmail.com> | 2014-06-14 18:31:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-06-14 18:31:24 +0000 |
commit | bec846007b6eb358d5dee8baea6cd870ce88cff2 (patch) | |
tree | 98f5b59d92356fc65a9ccc895ce64e66fc18ffdd /plugins/Clist_modern/src/modern_clistsettings.cpp | |
parent | 6bcddf950c9540f89462706948dad7e28be31583 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@9483 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clistsettings.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clistsettings.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 993eedc5a0..d83af199f4 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -138,9 +138,9 @@ void CListSettings_CopyCacheItems(ClcCacheEntry *pDst, ClcCacheEntry *pSrc, DWOR if (flag & CCI_OTHER) {
pDst->bIsHidden = pSrc->bIsHidden;
pDst->m_cache_nNoHiddenOffline = pSrc->m_cache_nNoHiddenOffline;
- pDst->m_cache_bProtoNotExists = pSrc->m_cache_bProtoNotExists;
+ pDst->m_bProtoNotExists = pSrc->m_bProtoNotExists;
- pDst->m_cache_nHiddenSubcontact = pSrc->m_cache_nHiddenSubcontact;
+ pDst->m_bIsSub = pSrc->m_bIsSub;
pDst->i = pSrc->i;
pDst->ApparentMode = pSrc->ApparentMode;
pDst->NotOnList = pSrc->NotOnList;
@@ -199,10 +199,10 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) return;
}
- if (pdnce->m_cache_cszProto == NULL && pdnce->m_cache_bProtoNotExists == FALSE) {
+ if (pdnce->m_cache_cszProto == NULL && pdnce->m_bProtoNotExists == FALSE) {
pdnce->m_cache_cszProto = GetProtoForContact(pdnce->hContact);
if (pdnce->m_cache_cszProto == NULL)
- pdnce->m_cache_bProtoNotExists = FALSE;
+ pdnce->m_bProtoNotExists = FALSE;
else if (pdnce->m_cache_cszProto && pdnce->tszName)
pdnce->freeName();
}
@@ -210,9 +210,9 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) if (pdnce->tszName == NULL)
pdnce->getName();
- else if (pdnce->isUnknown && pdnce->m_cache_cszProto && pdnce->m_cache_bProtoNotExists == TRUE && g_flag_bOnModulesLoadedCalled) {
+ else if (pdnce->isUnknown && pdnce->m_cache_cszProto && pdnce->m_bProtoNotExists == TRUE && g_flag_bOnModulesLoadedCalled) {
if (CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)pdnce->m_cache_cszProto) == 0) {
- pdnce->m_cache_bProtoNotExists = FALSE;
+ pdnce->m_bProtoNotExists = FALSE;
pdnce->getName();
}
}
@@ -232,7 +232,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) if (pdnce->bIsHidden == -1)
pdnce->bIsHidden = db_get_b(pdnce->hContact, "CList", "Hidden", 0);
- pdnce->m_cache_nHiddenSubcontact = db_mc_isSub(pdnce->hContact);
+ pdnce->m_bIsSub = db_mc_isSub(pdnce->hContact) != 0;
if (pdnce->m_cache_nNoHiddenOffline == -1)
pdnce->m_cache_nNoHiddenOffline = db_get_b(pdnce->hContact, "CList", "noOffline", 0);
@@ -299,8 +299,7 @@ void InvalidateDNCEbyPointer(MCONTACT hContact, ClcCacheEntry *pdnce, int Settin else pdnce->dwLastMsgTime = -1;
pdnce->bIsHidden = -1;
- pdnce->m_cache_nHiddenSubcontact = -1;
- pdnce->m_cache_bProtoNotExists = FALSE;
+ pdnce->m_bIsSub = pdnce->m_bProtoNotExists = false;
pdnce___SetStatus(pdnce, 0);
pdnce->IdleTS = -1;
pdnce->ApparentMode = -1;
@@ -343,7 +342,7 @@ void ClcCacheEntry::getName() {
freeName();
- if (m_cache_bProtoNotExists || !m_cache_cszProto) {
+ if (m_bProtoNotExists || !m_cache_cszProto) {
LBL_Unknown:
tszName = UnknownConctactTranslatedName;
isUnknown = true;
@@ -388,6 +387,15 @@ int ContactAdded(WPARAM hContact, LPARAM lParam) return 0;
}
+int MetaStatusChanged(WPARAM hMeta, LPARAM hSub)
+{
+ ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(hMeta);
+ if (pdnce)
+ pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hMeta, 0);
+
+ return 0;
+}
+
int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
if (MirandaExiting() || !pcli || hContact == NULL)
@@ -399,7 +407,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
}
- if (pdnce->m_cache_bProtoNotExists || !pdnce->m_cache_cszProto)
+ if (pdnce->m_bProtoNotExists || !pdnce->m_cache_cszProto)
return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
|