diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/src/init.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmod.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistsettings.cpp | 23 | ||||
-rw-r--r-- | plugins/Clist_modern/src/stdafx.h | 2 |
4 files changed, 9 insertions, 24 deletions
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 236275a2a0..c579ba513b 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -136,6 +136,7 @@ static HRESULT SubclassClistInterface() pcli->hInst = g_hInst;
pcli->bDisplayLocked = TRUE;
+ pcli->pfnCreateCacheItem = cliCreateCacheItem;
pcli->pfnCheckCacheItem = cliCheckCacheItem;
pcli->pfnFreeCacheItem = cliFreeCacheItem;
pcli->pfnInvalidateDisplayNameCacheEntry = cliInvalidateDisplayNameCacheEntry;
@@ -148,7 +149,6 @@ static HRESULT SubclassClistInterface() pcli->pfnBeginRenameSelection = cliBeginRenameSelection;
pcli->pfnCreateClcContact = cliCreateClcContact;
- pcli->pfnCreateCacheItem = cliCreateCacheItem;
pcli->pfnGetRowBottomY = cliGetRowBottomY;
pcli->pfnGetRowHeight = cliGetRowHeight;
pcli->pfnGetRowTopY = cliGetRowTopY;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index fe2f583a82..a6d774893a 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -23,6 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "stdafx.h"
+#include "modern_awaymsg.h"
#include "modern_sync.h"
#include "modern_clui.h"
@@ -134,7 +135,7 @@ void UnLoadContactListModule() //unhooks noncritical events int CListMod_ContactListShutdownProc(WPARAM, LPARAM)
{
- FreeDisplayNameCache();
+ UninitAwayMsgModule();
return 0;
}
@@ -157,7 +158,8 @@ INT_PTR SvcApplySkin(WPARAM wParam, LPARAM lParam); HRESULT CluiLoadModule()
{
- InitDisplayNameCache();
+ InitAwayMsgModule();
+
HookEvent(ME_SYSTEM_SHUTDOWN, CListMod_ContactListShutdownProc);
HookEvent(ME_OPT_INITIALISE, CListOptInit);
HookEvent(ME_OPT_INITIALISE, SkinOptInit);
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 4a5013b7c2..08b5b17827 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -23,30 +23,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "stdafx.h"
-#include "modern_awaymsg.h"
void InsertContactIntoTree(MCONTACT hContact, int status);
TCHAR* UnknownConctactTranslatedName = NULL;
-void InitDisplayNameCache(void)
-{
- InitAwayMsgModule();
-}
-
-void FreeDisplayNameCache()
-{
- UninitAwayMsgModule();
-}
-
void cliFreeCacheItem(ClcCacheEntry *p)
{
- mir_free_and_nil(p->tszName);
- mir_free_and_nil(p->tszGroup);
mir_free_and_nil(p->szSecondLineText);
mir_free_and_nil(p->szThirdLineText);
p->ssSecondLine.DestroySmileyList();
p->ssThirdLine.DestroySmileyList();
+
+ corecli.pfnFreeCacheItem(p);
}
void cliCheckCacheItem(ClcCacheEntry *pdnce)
@@ -74,18 +63,14 @@ 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);
- if (pdnce->tszGroup == NULL) {
- pdnce->tszGroup = db_get_tsa(pdnce->hContact, "CList", "Group");
- if (pdnce->tszGroup == NULL)
- pdnce->tszGroup = mir_tstrdup(_T(""));
- }
-
// 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)) {
pdnce->dwLastMsgTime = db_get_dw(pdnce->hContact, "CList", "mf_lastmsg", 0);
if (pdnce->dwLastMsgTime == 0)
pdnce->dwLastMsgTime = CompareContacts2_getLMTime(pdnce->hContact);
}
+
+ corecli.pfnCheckCacheItem(pdnce);
}
int GetStatusForContact(MCONTACT hContact, char *szProto)
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h index b8d2006b04..dd9534c389 100644 --- a/plugins/Clist_modern/src/stdafx.h +++ b/plugins/Clist_modern/src/stdafx.h @@ -168,8 +168,6 @@ char* __cdecl strstri(char *a, const char *b); HBITMAP ske_CreateDIB32(int cx, int cy);
-void InitDisplayNameCache(void);
-void FreeDisplayNameCache();
int CLUI_ShowWindowMod(HWND hwnd, int cmd);
void MakeButtonSkinned(HWND hWnd);
|