summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/Include
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-08 13:41:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-08 13:41:31 +0000
commit29caf2ccc31bc009d25b577cfc1cfbd82163aa3b (patch)
treed4122345850eaf1c2bbf4fce285bc63b5ffd937d /plugins/Clist_nicer/src/Include
parentc4c02e49eddd09393cafb55513f5067b5810c1c9 (diff)
major speedup of clist nicer+ cache
git-svn-id: http://svn.miranda-ng.org/main/trunk@3920 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/Include')
-rw-r--r--plugins/Clist_nicer/src/Include/clc.h6
-rw-r--r--plugins/Clist_nicer/src/Include/config.h55
-rw-r--r--plugins/Clist_nicer/src/Include/rowheight_funcs.h2
3 files changed, 31 insertions, 32 deletions
diff --git a/plugins/Clist_nicer/src/Include/clc.h b/plugins/Clist_nicer/src/Include/clc.h
index 5bafa1080c..e28143eeec 100644
--- a/plugins/Clist_nicer/src/Include/clc.h
+++ b/plugins/Clist_nicer/src/Include/clc.h
@@ -131,9 +131,9 @@ struct ClcContact : public ClcContactBase
BYTE xStatus;
char *metaProto;
DWORD codePage;
- struct avatarCacheEntry *ace;
+ avatarCacheEntry *ace;
WORD wStatus;
- int extraCacheEntry;
+ TExtraCache* pExtra;
int avatarLeft, extraIconRightBegin;
int isRtl;
DWORD cFlags;
@@ -389,7 +389,7 @@ int GetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt);
void LoadClcOptions(HWND hwnd, struct ClcData *dat);
void RecalculateGroupCheckboxes(HWND hwnd, struct ClcData *dat);
void SetGroupChildCheckboxes(ClcGroup *group, int checked);
-BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto);
+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);
diff --git a/plugins/Clist_nicer/src/Include/config.h b/plugins/Clist_nicer/src/Include/config.h
index f84b2b8238..c7dd518a25 100644
--- a/plugins/Clist_nicer/src/Include/config.h
+++ b/plugins/Clist_nicer/src/Include/config.h
@@ -79,45 +79,44 @@ private:
class cfg
{
public:
- static void init ();
+ static void init();
- static DWORD getDword (const HANDLE hContact, const char *szModule, const char *szSetting, DWORD uDefault);
- static DWORD getDword (const char *szModule, const char *szSetting, DWORD uDefault);
- static DWORD getDword (const char *szSetting, DWORD uDefault);
+ static DWORD getDword(const HANDLE hContact, const char *szModule, const char *szSetting, DWORD uDefault);
+ static DWORD getDword(const char *szModule, const char *szSetting, DWORD uDefault);
+ static DWORD getDword(const char *szSetting, DWORD uDefault);
- static WORD getWord (const HANDLE hContact, const char *szModule, const char *szSetting, WORD uDefault);
- static WORD getWord (const char *szModule, const char *szSetting, WORD uDefault);
- static WORD getWord (const char *szSetting, WORD uDefault);
+ static WORD getWord(const HANDLE hContact, const char *szModule, const char *szSetting, WORD uDefault);
+ static WORD getWord(const char *szModule, const char *szSetting, WORD uDefault);
+ static WORD getWord(const char *szSetting, WORD uDefault);
- static int getByte (const HANDLE hContact, const char *szModule, const char *szSetting, int uDefault);
- static int getByte (const char *szModule, const char *szSetting, int uDefault);
- static int getByte (const char *szSetting, int uDefault);
+ static int getByte(const HANDLE hContact, const char *szModule, const char *szSetting, int uDefault);
+ static int getByte(const char *szModule, const char *szSetting, int uDefault);
+ static int getByte(const char *szSetting, int uDefault);
- static INT_PTR getTString (const HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
- static INT_PTR getString (const HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+ static INT_PTR getTString(const HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+ static INT_PTR getString(const HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
- static INT_PTR writeDword (const HANDLE hContact, const char *szModule, const char *szSetting, DWORD value);
- static INT_PTR writeDword (const char *szModule, const char *szSetting, DWORD value);
+ static INT_PTR writeDword(const HANDLE hContact, const char *szModule, const char *szSetting, DWORD value);
+ static INT_PTR writeDword(const char *szModule, const char *szSetting, DWORD value);
- static INT_PTR writeWord (const HANDLE hContact, const char *szModule, const char *szSetting, WORD value);
- static INT_PTR writeWord (const char *szModule, const char *szSetting, WORD value);
+ static INT_PTR writeWord(const HANDLE hContact, const char *szModule, const char *szSetting, WORD value);
+ static INT_PTR writeWord(const char *szModule, const char *szSetting, WORD value);
- static INT_PTR writeByte (const HANDLE hContact, const char *szModule, const char *szSetting, BYTE value);
- static INT_PTR writeByte (const char *szModule, const char *szSetting, BYTE value);
+ static INT_PTR writeByte(const HANDLE hContact, const char *szModule, const char *szSetting, BYTE value);
+ static INT_PTR writeByte(const char *szModule, const char *szSetting, BYTE value);
- static INT_PTR writeTString (const HANDLE hContact, const char *szModule, const char *szSetting, const TCHAR *st);
- static INT_PTR writeString (const HANDLE hContact, const char *szModule, const char *szSetting, const char *st);
- static int getCache (const HANDLE hContact, const char *szProto);
+ static INT_PTR writeTString(const HANDLE hContact, const char *szModule, const char *szSetting, const TCHAR *st);
+ static INT_PTR writeString(const HANDLE hContact, const char *szModule, const char *szSetting, const char *st);
+
+ static TExtraCache* getCache(const HANDLE hContact, const char *szProto);
public:
- static TCluiData dat;
- static ClcData* clcdat;
- static TExtraCache* eCache;
- static int nextCacheEntry, maxCacheEntry;
+ static TCluiData dat;
+ static ClcData* clcdat;
+
+ static LIST<TExtraCache> arCache;
- static CRITICAL_SECTION cachecs;
-
- static bool shutDown;
+ static bool shutDown;
};
struct TSysConfig {
diff --git a/plugins/Clist_nicer/src/Include/rowheight_funcs.h b/plugins/Clist_nicer/src/Include/rowheight_funcs.h
index 89bc2f4ad2..d2292e6e5a 100644
--- a/plugins/Clist_nicer/src/Include/rowheight_funcs.h
+++ b/plugins/Clist_nicer/src/Include/rowheight_funcs.h
@@ -32,7 +32,7 @@ public:
if ( !dat->bisEmbedded) {
if (contact->bSecondLine != MULTIROW_NEVER && contact->bSecondLine != MULTIROW_IFSPACE && contact->type == CLCIT_CONTACT) {
- if ((contact->bSecondLine == MULTIROW_ALWAYS || ((cfg::dat.dwFlags & CLUI_FRAME_SHOWSTATUSMSG && contact->bSecondLine == MULTIROW_IFNEEDED) && (contact->xStatus > 0 || cfg::eCache[contact->extraCacheEntry].bStatusMsgValid > STATUSMSG_XSTATUSID))))
+ if ((contact->bSecondLine == MULTIROW_ALWAYS || ((cfg::dat.dwFlags & CLUI_FRAME_SHOWSTATUSMSG && contact->bSecondLine == MULTIROW_IFNEEDED) && (contact->xStatus > 0 || contact->pExtra->bStatusMsgValid > STATUSMSG_XSTATUSID))))
height += (dat->fontInfo[FONTID_STATUS].fontHeight + cfg::dat.avatarPadding);
}