diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-27 18:39:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-27 18:39:07 +0300 |
commit | 7eaccc7d1af879e2a8c58364ca0c11816225dfe0 (patch) | |
tree | bdef114c786c6f372da0b76317d58c5373534e8d | |
parent | 7352a4a4329f0d91f6b69da785891f917d261827 (diff) |
there's no need to load contacts from unloaded protocols
-rw-r--r-- | include/m_clistint.h | 3 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_awaymsg.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_cachefuncs.cpp | 34 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcitems.cpp | 14 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clist.h | 1 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmod.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistsettings.cpp | 22 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.h | 44 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clist.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/clcitems.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clistsettings.cpp | 1 |
12 files changed, 63 insertions, 70 deletions
diff --git a/include/m_clistint.h b/include/m_clistint.h index 29ee8791e9..3e145fa977 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -268,7 +268,8 @@ struct ClcCacheEntryBase MCONTACT hContact;
wchar_t* tszName;
wchar_t* tszGroup;
- int bIsHidden;
+ int bIsHidden;
+ char* szProto;
};
struct CLIST_INTERFACE
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index 9b999c37b0..811e95a5de 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -98,7 +98,7 @@ static void amThreadProc(void *) ack.hContact = hContact;
ack.type = ACKTYPE_AWAYMSG;
ack.result = ACKRESULT_FAILED;
- ack.szModule = pdnce->m_pszProto;
+ ack.szModule = pdnce->szProto;
ClcDoProtoAck(&ack);
}
amRequestTick = time;
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 50056ee3df..97dc946890 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -187,9 +187,9 @@ void CSmileyString::ReplaceSmileys(ClcData *dat, ClcCacheEntry *pdnce, wchar_t * sp.cbSize = sizeof(sp); if (dat->text_use_protocol_smileys) { - sp.Protocolname = pdnce->m_pszProto; + sp.Protocolname = pdnce->szProto; - if (db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->m_pszProto != nullptr && mir_strcmp(pdnce->m_pszProto, META_PROTO) == 0) { + if (db_get_b(0, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->szProto != nullptr && mir_strcmp(pdnce->szProto, META_PROTO) == 0) { MCONTACT hContact = db_mc_getMostOnline(pdnce->hContact); if (hContact != 0) sp.Protocolname = GetContactProto(hContact); @@ -280,9 +280,9 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat if (nStatus == ID_STATUS_OFFLINE || nStatus == 0) noXstatus = TRUE; text[0] = '\0'; // Get XStatusName - if (!noAwayMsg && !noXstatus && xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) { + if (!noAwayMsg && !noXstatus && xstatus_has_priority && pdnce->hContact && pdnce->szProto) { DBVARIANT dbv = { 0 }; - if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) { + if (!db_get_ws(pdnce->hContact, pdnce->szProto, "XStatusName", &dbv)) { //mir_wstrncpy(text, dbv.pszVal, text_size); CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1); db_free(&dbv); @@ -300,9 +300,9 @@ int GetStatusName(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xstat } // Get XStatusName - if (!noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) { + if (!noAwayMsg && !noXstatus && !xstatus_has_priority && pdnce->hContact && pdnce->szProto) { DBVARIANT dbv = { 0 }; - if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "XStatusName", &dbv)) { + if (!db_get_ws(pdnce->hContact, pdnce->szProto, "XStatusName", &dbv)) { CopySkipUnprintableChars(text, dbv.ptszVal, text_size - 1); db_free(&dbv); @@ -324,7 +324,7 @@ void GetListeningTo(wchar_t *text, int text_size, ClcCacheEntry *pdnce) if (pdnce->m_iStatus == ID_STATUS_OFFLINE || pdnce->m_iStatus == 0) return; - ptrW tszValue(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "ListeningTo")); + ptrW tszValue(db_get_wsa(pdnce->hContact, pdnce->szProto, "ListeningTo")); if (tszValue != nullptr) CopySkipUnprintableChars(text, tszValue, text_size - 1); } @@ -344,8 +344,8 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs noAwayMsg = TRUE; // Get XStatusMsg - if (!noAwayMsg && xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto) { - ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); + if (!noAwayMsg && xstatus_has_priority && pdnce->hContact && pdnce->szProto) { + ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->szProto, "XStatusMsg")); if (tszXStatusMsg != nullptr) { CopySkipUnprintableChars(text, tszXStatusMsg, text_size - 1); if (text[0] != '\0') @@ -364,9 +364,9 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs } // Get XStatusMsg - if (!noAwayMsg && !xstatus_has_priority && pdnce->hContact && pdnce->m_pszProto && text[0] == '\0') { + if (!noAwayMsg && !xstatus_has_priority && pdnce->hContact && pdnce->szProto && text[0] == '\0') { // Try to get XStatusMsg - ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); + ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->szProto, "XStatusMsg")); if (tszXStatusMsg != nullptr) { CopySkipUnprintableChars(text, tszXStatusMsg, text_size - 1); if (text[0] != '\0') @@ -391,7 +391,7 @@ int Cache_GetLineText(ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size LBL_Status: if (GetStatusName(text, text_size, pdnce, line.xstatus_has_priority) == -1 && line.use_name_and_message_for_xstatus) { // Try to get XStatusMsg - ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusMsg")); + ptrW tszXStatusMsg(db_get_wsa(pdnce->hContact, pdnce->szProto, "XStatusMsg")); if (tszXStatusMsg != nullptr && tszXStatusMsg[0] != 0) { wchar_t *tmp = NEWWSTR_ALLOCA(text); mir_snwprintf(text, text_size, L"%s: %s", tmp, tszXStatusMsg); @@ -401,8 +401,8 @@ LBL_Status: return TEXT_STATUS; case TEXT_NICKNAME: - if (pdnce->hContact && pdnce->m_pszProto) { - ptrW tszNick(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "Nick")); + if (pdnce->hContact && pdnce->szProto) { + ptrW tszNick(db_get_wsa(pdnce->hContact, pdnce->szProto, "Nick")); if (tszNick != nullptr) { mir_wstrncpy(text, tszNick, text_size); CopySkipUnprintableChars(text, text, text_size - 1); @@ -413,7 +413,7 @@ LBL_Status: case TEXT_STATUS_MESSAGE: if (GetStatusMessage(text, text_size, pdnce, line.xstatus_has_priority) == -1 && line.use_name_and_message_for_xstatus) { // Try to get XStatusName - ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); + ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->szProto, "XStatusName")); if (tszXStatusName != nullptr && tszXStatusName[0] != 0) { wchar_t *tmp = NEWWSTR_ALLOCA(text); mir_snwprintf(text, text_size, L"%s: %s", tszXStatusName, tmp); @@ -422,7 +422,7 @@ LBL_Status: } else if (line.use_name_and_message_for_xstatus && line.xstatus_has_priority) { // Try to get XStatusName - ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->m_pszProto, "XStatusName")); + ptrW tszXStatusName(db_get_wsa(pdnce->hContact, pdnce->szProto, "XStatusName")); if (tszXStatusName != nullptr && tszXStatusName[0] != 0) { mir_wstrncpy(text, tszXStatusName, text_size); CopySkipUnprintableChars(text, text, text_size - 1); @@ -477,7 +477,7 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact) wchar_t *name = pcli->pfnGetContactDisplayName(contact->hContact, 0); if (dat->first_line_append_nick && !dat->bForceInDialog) { DBVARIANT dbv = { 0 }; - if (!db_get_ws(pdnce->hContact, pdnce->m_pszProto, "Nick", &dbv)) { + if (!db_get_ws(pdnce->hContact, pdnce->szProto, "Nick", &dbv)) { wchar_t nick[_countof(contact->szText)]; mir_wstrncpy(nick, dbv.ptszVal, _countof(contact->szText)); db_free(&dbv); diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index fddd7390cc..a5853658ac 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1507,7 +1507,7 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM ClcContact *contact;
if (Clist_FindItem(hwnd, dat, wParam, &contact, nullptr, nullptr)) { /////////////////// ??
ClcCacheEntry *pdnce = contact->pce;
- if (pdnce && pdnce->m_pszProto) {
+ if (pdnce && pdnce->szProto) {
if (!dat->bForceInDialog) {
Cache_GetNthLineText(dat, pdnce, 2);
Cache_GetNthLineText(dat, pdnce, 3);
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index c60058c1bc..7e8cccfdd3 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -61,7 +61,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) p.iImage = corecli.pfnGetContactIcon(pdnce->hContact);
memset(p.iExtraImage, 0xFF, sizeof(p.iExtraImage));
- p.proto = pdnce->m_pszProto;
+ p.proto = pdnce->szProto;
p.type = CLCIT_CONTACT;
p.flags = 0;
p.iSubNumber = i + 1;
@@ -71,7 +71,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) Cache_GetTimezone(dat, (&p)->hContact);
Cache_GetText(dat, &p);
- char *szProto = pdnce->m_pszProto;
+ char *szProto = pdnce->szProto;
if (szProto != nullptr && !pcli->pfnIsHiddenMode(dat, wStatus))
p.flags |= CONTACTF_ONLINE;
int apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0;
@@ -116,7 +116,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup if (!cont)
return;
- char *szProto = pdnce->m_pszProto;
+ char *szProto = pdnce->szProto;
cont->type = CLCIT_CONTACT;
cont->pce = pdnce;
@@ -182,7 +182,7 @@ void cli_AddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int update if (dat->IsMetaContactsEnabled && pdnce->m_bIsSub)
return; //contact should not be added
- if (!dat->IsMetaContactsEnabled && !mir_strcmp(pdnce->m_pszProto, META_PROTO))
+ if (!dat->IsMetaContactsEnabled && !mir_strcmp(pdnce->szProto, META_PROTO))
return;
corecli.pfnAddContactToTree(hwnd, dat, hContact, updateTotalCount, checkHideOffline);
@@ -325,12 +325,12 @@ ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact) return nullptr;
pdnce->hContact = hContact;
- pdnce->m_pszProto = GetContactProto(hContact);
+ pdnce->szProto = GetContactProto(hContact);
pdnce->bIsHidden = db_get_b(hContact, "CList", "Hidden", 0);
pdnce->m_bIsSub = db_mc_isSub(hContact) != 0;
pdnce->m_bNoHiddenOffline = db_get_b(hContact, "CList", "noOffline", 0);
- pdnce->IdleTS = db_get_dw(hContact, pdnce->m_pszProto, "IdleTS", 0);
- pdnce->ApparentMode = db_get_w(hContact, pdnce->m_pszProto, "ApparentMode", 0);
+ pdnce->IdleTS = db_get_dw(hContact, pdnce->szProto, "IdleTS", 0);
+ pdnce->ApparentMode = db_get_w(hContact, pdnce->szProto, "ApparentMode", 0);
pdnce->NotOnList = db_get_b(hContact, "CList", "NotOnList", 0);
pdnce->IsExpanded = db_get_b(hContact, "CList", "Expanded", 0);
pdnce->dwLastMsgTime = -1;
diff --git a/plugins/Clist_modern/src/modern_clist.h b/plugins/Clist_modern/src/modern_clist.h index 18c4748486..0c87e3a518 100644 --- a/plugins/Clist_modern/src/modern_clist.h +++ b/plugins/Clist_modern/src/modern_clist.h @@ -76,7 +76,6 @@ struct ClcCacheEntry : public ClcCacheEntryBase int m_bNoHiddenOffline;
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 c977d85886..650bd4181a 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -79,8 +79,8 @@ int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact) MCONTACT hMostOnlineContact = db_mc_getMostOnline(hActContact);
if (hMostOnlineContact) {
ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hMostOnlineContact);
- if (cacheEntry && cacheEntry->m_pszProto) {
- szActProto = cacheEntry->m_pszProto;
+ if (cacheEntry && cacheEntry->szProto) {
+ szActProto = cacheEntry->szProto;
nActStatus = cacheEntry->m_iStatus;
hActContact = hMostOnlineContact;
}
@@ -115,7 +115,7 @@ int cli_GetContactIcon(MCONTACT hContact) int GetContactIconC(ClcCacheEntry *p)
{
- return pcli->pfnIconFromStatusMode(p->m_pszProto, p->m_pszProto == nullptr ? ID_STATUS_OFFLINE : p->m_iStatus, p->hContact);
+ return pcli->pfnIconFromStatusMode(p->szProto, p->szProto == nullptr ? 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 4a692a154d..f2d6136c4d 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -47,9 +47,9 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) return;
}
- if (pdnce->m_pszProto == nullptr) {
- pdnce->m_pszProto = GetContactProto(pdnce->hContact);
- if (pdnce->m_pszProto && pdnce->tszName)
+ if (pdnce->szProto == nullptr) {
+ pdnce->szProto = GetContactProto(pdnce->hContact);
+ if (pdnce->szProto && pdnce->tszName)
mir_free_and_nil(pdnce->tszName);
}
@@ -59,7 +59,7 @@ void cliCheckCacheItem(ClcCacheEntry *pdnce) }
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);
+ pdnce->m_iStatus = GetStatusForContact(pdnce->hContact, pdnce->szProto);
// this variable isn't filled inside cliCreateCacheItem() because the filter could be changed dynamically
if (pdnce->dwLastMsgTime == -1 && g_CluiData.bFilterEffective & (CLVM_FILTER_LASTMSG | CLVM_FILTER_LASTMSG_NEWERTHAN | CLVM_FILTER_LASTMSG_OLDERTHAN)) {
@@ -80,7 +80,7 @@ int GetContactInfosForSort(MCONTACT hContact, char **Proto, wchar_t **Name, int {
ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != nullptr) {
- if (Proto != nullptr) *Proto = cacheEntry->m_pszProto;
+ if (Proto != nullptr) *Proto = cacheEntry->szProto;
if (Name != nullptr) *Name = cacheEntry->tszName;
if (Status != nullptr) *Status = cacheEntry->m_iStatus;
}
@@ -120,11 +120,11 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
}
- if (pdnce->m_pszProto == nullptr)
+ if (pdnce->szProto == nullptr)
return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (!strcmp(cws->szModule, pdnce->m_pszProto)) {
+ if (!strcmp(cws->szModule, pdnce->szProto)) {
if (!strcmp(cws->szSetting, "Status")) {
pdnce->m_iStatus = cws->value.wVal;
if (pdnce->bIsHidden)
@@ -134,7 +134,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (g_CluiData.bRemoveAwayMessageForOffline)
db_set_s(hContact, "CList", "StatusMsg", "");
- if ((db_get_w(0, "CList", "SecondLineType", 0) == TEXT_STATUS_MESSAGE || db_get_w(0, "CList", "ThirdLineType", 0) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_pszProto)
+ if ((db_get_w(0, "CList", "SecondLineType", 0) == TEXT_STATUS_MESSAGE || db_get_w(0, "CList", "ThirdLineType", 0) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->szProto)
amRequestAwayMsg(hContact);
Clist_Broadcast(INTM_STATUSCHANGED, hContact, 0);
@@ -143,7 +143,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (pcli->hwndContactTree && g_flag_bOnModulesLoadedCalled)
pcli->pfnInitAutoRebuild(pcli->hwndContactTree);
- if ((db_get_w(0, "CList", "SecondLineType", SETTING_SECONDLINE_TYPE_DEFAULT) == TEXT_STATUS_MESSAGE || db_get_w(0, "CList", "ThirdLineType", SETTING_THIRDLINE_TYPE_DEFAULT) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->m_pszProto)
+ if ((db_get_w(0, "CList", "SecondLineType", SETTING_SECONDLINE_TYPE_DEFAULT) == TEXT_STATUS_MESSAGE || db_get_w(0, "CList", "ThirdLineType", SETTING_THIRDLINE_TYPE_DEFAULT) == TEXT_STATUS_MESSAGE) && pdnce->hContact && pdnce->szProto)
amRequestAwayMsg(hContact);
}
else if (!strcmp(cws->szSetting, "ApparentMode"))
@@ -170,7 +170,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) else if (!strcmp(cws->szSetting, "Hidden")) {
pdnce->bIsHidden = cws->value.bVal;
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0)
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(pdnce->m_pszProto, pdnce->getStatus(), hContact));
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(pdnce->szProto, pdnce->getStatus(), hContact));
Clist_Broadcast(CLM_AUTOREBUILD, 0, 0);
}
@@ -181,7 +181,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) }
else if (!strcmp(cws->szModule, "Protocol")) {
if (!strcmp(cws->szSetting, "p")) {
- pdnce->m_pszProto = GetContactProto(hContact);
+ pdnce->szProto = GetContactProto(hContact);
char *szProto = (cws->value.type == DBVT_DELETED) ? nullptr : cws->value.pszVal;
pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto, pdnce->getStatus(), hContact));
}
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h index e670e6d764..2af07f523f 100644 --- a/plugins/Clist_nicer/src/clc.h +++ b/plugins/Clist_nicer/src/clc.h @@ -372,35 +372,29 @@ DWORD INTSORT_GetLastMsgTime(MCONTACT hContact); LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
// clcutils.c
-void SetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
-void DoSelectionDefaultAction(HWND hwnd, struct ClcData *dat);
-int FindRowByText(HWND hwnd, struct ClcData *dat, const wchar_t *text, int prefixOk);
-void BeginRenameSelection(HWND hwnd, struct ClcData *dat);
-int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
-void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
-void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
-size_t MY_pathToRelative(const wchar_t *pSrc, wchar_t *pOut);
-size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut);
-
-int GetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt);
-void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);
-void RecalculateGroupCheckboxes(HWND hwnd, struct ClcData *dat);
-void SetGroupChildCheckboxes(ClcGroup *group, int checked);
-BYTE GetCachedStatusMsg(TExtraCache* p, char *szProto);
-int __fastcall GetStatusOnlineness(int status);
-void GetExtendedInfo(ClcContact *contact, struct ClcData *dat);
-extern LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-void HideShowNotifyFrame();
-DWORD GetCLUIWindowStyle(BYTE style);
-void ApplyCLUIBorderStyle();
+void SetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState);
+void BeginRenameSelection(HWND hwnd, struct ClcData *dat);
+int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD *flags);
+void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth);
+void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
+size_t MY_pathToRelative(const wchar_t *pSrc, wchar_t *pOut);
+size_t MY_pathToAbsolute(const wchar_t *pSrc, wchar_t *pOut);
+
+int GetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt);
+void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst);
+BYTE GetCachedStatusMsg(TExtraCache* p, char *szProto);
+int __fastcall GetStatusOnlineness(int status);
+void GetExtendedInfo(ClcContact *contact, struct ClcData *dat);
+LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+void HideShowNotifyFrame();
+DWORD GetCLUIWindowStyle(BYTE style);
+void ApplyCLUIBorderStyle();
int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar);
int FrameNCPaint(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar);
void FreeProtocolData( void );
-void GetClientID(ClcContact *contact, char *client);
-int LoadCLCButtonModule(void);
void SetButtonStates();
void ConfigureCLUIGeometry(int mode);
void IcoLibReloadIcons();
@@ -414,7 +408,6 @@ void SkinDrawBg(HWND hwnd, HDC hdc); int GetBasicFontID(ClcContact *contact);
int CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, struct ClcData *dat);
void CreateViewModeFrame();
-int GetExtraCache(MCONTACT hContact, char *szProto);
void ReloadExtraInfo(MCONTACT hContact);
void LoadAvatarForContact(ClcContact *p);
void ApplyViewMode(const char *name);
@@ -434,8 +427,7 @@ void CLN_LoadAllIcons(BOOL mode); void ReloadSkinItemsToCache();
// clcopts.c
-int ClcOptInit(WPARAM wParam, LPARAM lParam);
-void GetFontSetting(int i, LOGFONTA *lf, COLORREF *colour);
+int ClcOptInit(WPARAM wParam, LPARAM lParam);
void CluiProtocolStatusChanged(int, const char*);
void LoadSkinItemToCache(struct TExtraCache *cEntry);
diff --git a/plugins/Clist_nicer/src/clist.h b/plugins/Clist_nicer/src/clist.h index f229f42c22..8e6d0e3212 100644 --- a/plugins/Clist_nicer/src/clist.h +++ b/plugins/Clist_nicer/src/clist.h @@ -25,8 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once
int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON *phIcon);
-HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
-void SortContacts(void);
#define CLUIINTM_REDRAW (WM_USER+100)
#define CLUIINTM_STATUSBARUPDATE (WM_USER+101)
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 45bcaee71c..4a6a537463 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -363,6 +363,8 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) int nHiddenStatus = cli.pfnGetContactHiddenStatus(hContact, nullptr, dat); if (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus) { ClcCacheEntry *pce = cli.pfnGetCacheEntry(hContact); + if (pce->szProto == nullptr) + continue; ClcGroup *group; ptrW tszGroupName(db_get_wsa(hContact, "CList", "Group")); diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index c2272920f8..b81767e776 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -49,6 +49,7 @@ ClcCacheEntry* fnCreateCacheItem(MCONTACT hContact) return nullptr;
p->hContact = hContact;
+ p->szProto = GetContactProto(hContact);
return p;
}
|