diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcitems.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clist.h | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmod.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistsettings.cpp | 18 |
5 files changed, 25 insertions, 21 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 8ac0853243..821d183cff 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -289,7 +289,7 @@ static BOOL clcItemNotHiddenOffline(ClcGroup *group, ClcContact *contact) if (!contact) return FALSE; ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(contact->hContact); if (!pdnce) return FALSE; - if (pdnce->m_cache_nNoHiddenOffline) return TRUE; + if (pdnce->m_bNoHiddenOffline) return TRUE; if (!group) return FALSE; if (group->hideOffline) return FALSE; @@ -1564,7 +1564,7 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM if (wParam != 0) { ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(wParam); if (pdnce && pdnce->m_pszProto) { - pdnce->m_cache_nStatus = GetStatusForContact(pdnce->hContact, pdnce->m_pszProto); + pdnce->m_iStatus = GetStatusForContact(pdnce->hContact, pdnce->m_pszProto); if (!dat->force_in_dialog && (dat->second_line_show || dat->third_line_show)) gtaRenewText(pdnce->hContact); SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon(wParam)); diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 2b4931bcd1..2bca3600b7 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -51,7 +51,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) cacheEntry = pcli->pfnGetCacheEntry(hsub); WORD wStatus = pdnce___GetStatus(cacheEntry); - if (!showOfflineHereGroup && bHideOffline && !cacheEntry->m_cache_nNoHiddenOffline && wStatus == ID_STATUS_OFFLINE) + if (!showOfflineHereGroup && bHideOffline && !cacheEntry->m_bNoHiddenOffline && wStatus == ID_STATUS_OFFLINE) continue; ClcContact& p = cont->subcontacts[i]; @@ -384,10 +384,10 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) if (!(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) { if (cacheEntry->m_pszProto == NULL) { - if (!pcli->pfnIsHiddenMode(dat, ID_STATUS_OFFLINE) || cacheEntry->m_cache_nNoHiddenOffline || CLCItems_IsShowOfflineGroup(group)) + if (!pcli->pfnIsHiddenMode(dat, ID_STATUS_OFFLINE) || cacheEntry->m_bNoHiddenOffline || CLCItems_IsShowOfflineGroup(group)) cont = AddContactToGroup(dat, group, cacheEntry); } - else if (!pcli->pfnIsHiddenMode(dat, wStatus) || cacheEntry->m_cache_nNoHiddenOffline || CLCItems_IsShowOfflineGroup(group)) + else if (!pcli->pfnIsHiddenMode(dat, wStatus) || cacheEntry->m_bNoHiddenOffline || CLCItems_IsShowOfflineGroup(group)) cont = AddContactToGroup(dat, group, cacheEntry); } else cont = AddContactToGroup(dat, group, cacheEntry); @@ -599,7 +599,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat) WORD pdnce___GetStatus(ClcCacheEntry *pdnce) { - return (!pdnce) ? ID_STATUS_OFFLINE : pdnce->m_cache_nStatus; + return (!pdnce) ? ID_STATUS_OFFLINE : pdnce->m_iStatus; } ClcContact* cliCreateClcContact() @@ -619,7 +619,7 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact) p->m_pszProto = GetContactProto(hContact); p->dwLastMsgTime = -1;
p->bIsHidden = -1;
- p->m_cache_nNoHiddenOffline = -1;
+ p->m_bNoHiddenOffline = -1;
p->IdleTS = -1;
p->NotOnList = -1;
p->IsExpanded = -1;
@@ -630,7 +630,11 @@ void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact) { if (hContact == INVALID_CONTACT_ID) corecli.pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID); - // no need to destroy a cache item otherwise + else { + ClcCacheEntry *p = pcli->pfnGetCacheEntry(hContact); + if (p) + p->m_iStatus = 0;
+ } } void cli_SetContactCheckboxes(ClcContact *cc, int checked) diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h index ad1e5dd342..50c6f87da2 100644 --- a/plugins/Clist_modern/src/modern_clist.h +++ b/plugins/Clist_modern/src/modern_clist.h @@ -74,9 +74,9 @@ public: struct ClcCacheEntry : public ClcCacheEntryBase
{
- int m_cache_nNoHiddenOffline;
+ int m_bNoHiddenOffline;
- int m_cache_nStatus;
+ int m_iStatus;
char* m_pszProto;
bool m_bIsSub;
bool m_bIsUnknown;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index dbfec61b36..1de81d7980 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -91,7 +91,7 @@ int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact) ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hMostOnlineContact);
if (cacheEntry && cacheEntry->m_pszProto) {
szActProto = cacheEntry->m_pszProto;
- nActStatus = cacheEntry->m_cache_nStatus;
+ nActStatus = cacheEntry->m_iStatus;
hActContact = hMostOnlineContact;
}
}
@@ -125,7 +125,7 @@ int cli_GetContactIcon(MCONTACT hContact) int GetContactIconC(ClcCacheEntry *p)
{
- return pcli->pfnIconFromStatusMode(p->m_pszProto, p->m_pszProto == NULL ? ID_STATUS_OFFLINE : p->m_cache_nStatus, p->hContact);
+ return pcli->pfnIconFromStatusMode(p->m_pszProto, p->m_pszProto == NULL ? ID_STATUS_OFFLINE : p->m_iStatus, p->hContact);
}
//lParam
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 922e2d736a..2c5c34dd59 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -112,7 +112,7 @@ void CListSettings_CopyCacheItems(ClcCacheEntry *pDst, ClcCacheEntry *pSrc, DWOR if (flag & CCI_GROUP) pDst->tszGroup = mir_tstrdup(pSrc->tszGroup);
if (flag & CCI_PROTO) pDst->m_pszProto = pSrc->m_pszProto;
- if (flag & CCI_STATUS) pDst->m_cache_nStatus = pSrc->m_cache_nStatus;
+ if (flag & CCI_STATUS) pDst->m_iStatus = pSrc->m_iStatus;
if (flag & CCI_LINES) {
mir_free(pDst->szThirdLineText);
@@ -130,7 +130,7 @@ 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_bNoHiddenOffline = pSrc->m_bNoHiddenOffline;
pDst->m_bIsSub = pSrc->m_bIsSub;
pDst->ApparentMode = pSrc->ApparentMode;
@@ -197,8 +197,8 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) if (pdnce->tszName == NULL)
pdnce->getName();
- if (pdnce->m_cache_nStatus == 0) //very strange look status sort is broken let always reread status
- pdnce->m_cache_nStatus = GetStatusForContact(pdnce->hContact, pdnce->m_pszProto);
+ if (pdnce->m_iStatus == 0) //very strange look status sort is broken let always reread status
+ pdnce->m_iStatus = GetStatusForContact(pdnce->hContact, pdnce->m_pszProto);
if (pdnce->tszGroup == NULL) {
pdnce->tszGroup = db_get_tsa(pdnce->hContact, "CList", "Group");
@@ -211,8 +211,8 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) 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);
+ if (pdnce->m_bNoHiddenOffline == -1)
+ pdnce->m_bNoHiddenOffline = db_get_b(pdnce->hContact, "CList", "noOffline", 0);
if (pdnce->IdleTS == -1)
pdnce->IdleTS = db_get_dw(pdnce->hContact, pdnce->m_pszProto, "IdleTS", 0);
@@ -299,7 +299,7 @@ int GetContactInfosForSort(MCONTACT hContact, char **Proto, TCHAR **Name, int *S if (cacheEntry != NULL) {
if (Proto != NULL) *Proto = cacheEntry->m_pszProto;
if (Name != NULL) *Name = cacheEntry->tszName;
- if (Status != NULL) *Status = cacheEntry->m_cache_nStatus;
+ if (Status != NULL) *Status = cacheEntry->m_iStatus;
}
return 0;
}
@@ -381,7 +381,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (pdnce->bIsHidden)
return 0;
- pdnce->m_cache_nStatus = cws->value.wVal;
+ pdnce->m_iStatus = cws->value.wVal;
if (cws->value.wVal == ID_STATUS_OFFLINE)
if (g_CluiData.bRemoveAwayMessageForOffline)
db_set_s(hContact, "CList", "StatusMsg", "");
@@ -429,7 +429,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
else if (!strcmp(cws->szSetting, "noOffline")) {
- pdnce->m_cache_nNoHiddenOffline = cws->value.bVal;
+ pdnce->m_bNoHiddenOffline = cws->value.bVal;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
}
|