diff options
Diffstat (limited to 'plugins/Clist_mw')
-rw-r--r-- | plugins/Clist_mw/src/clc.cpp | 18 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clc.h | 8 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clcidents.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clcitems.cpp | 16 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clist.h | 10 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistmod.cpp | 14 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistopts.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistsettings.cpp | 32 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clui.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_mw/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Clist_mw/src/contact.cpp | 14 | ||||
-rw-r--r-- | plugins/Clist_mw/src/init.cpp | 6 |
12 files changed, 68 insertions, 68 deletions
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 4f406eee21..648071ca5e 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -48,7 +48,7 @@ static int stopStatusUpdater = 0; void StatusUpdaterThread(void*)
{
int i,curdelay,lastcheck = 0;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_LOWEST);
@@ -143,9 +143,9 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case INTM_ICONCHANGED:
{
int recalcScrollBar = 0,shouldShow;
- HCONTACT hSelItem = NULL;
+ MCONTACT hSelItem = NULL;
struct ClcContact *selcontact = NULL;
- ClcCacheEntry *cacheEntry = GetContactFullCacheEntry((HCONTACT)wParam);
+ ClcCacheEntry *cacheEntry = GetContactFullCacheEntry((MCONTACT)wParam);
WORD status;
int needsResort = 0;
@@ -158,21 +158,21 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // this means an offline msg is flashing, so the contact should be shown
shouldShow = (GetWindowLongPtr(hwnd,GWL_STYLE) & CLS_SHOWHIDDEN || !cacheEntry->bIsHidden) &&
- (!pcli->pfnIsHiddenMode(dat, status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon((HCONTACT)wParam) != LOWORD(lParam));
+ (!pcli->pfnIsHiddenMode(dat, status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon((MCONTACT)wParam) != LOWORD(lParam));
ClcContact *contact;
ClcGroup *group;
if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
- AddContactToTree(hwnd, dat, (HCONTACT)wParam, 0, 0);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
+ AddContactToTree(hwnd, dat, (MCONTACT)wParam, 0, 0);
needsResort = 1;
recalcScrollBar = 1;
FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
if (contact) {
contact->iImage = (WORD)lParam;
- pcli->pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ pcli->pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
}
}
@@ -185,7 +185,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if ( !shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
RemoveItemFromGroup(hwnd,group,contact,0);
recalcScrollBar = 1;
dat->needsResort = 1;
@@ -222,7 +222,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L ClcGroup *group;
if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL) && contact != NULL) {
contact->flags &= ~CONTACTF_STATUSMSG;
- if (!db_get_ts((HCONTACT)wParam, "CList", "StatusMsg", &dbv)) {
+ if (!db_get_ts((MCONTACT)wParam, "CList", "StatusMsg", &dbv)) {
int j;
if (dbv.ptszVal == NULL || _tcslen(dbv.ptszVal) == 0) break;
lstrcpyn(contact->szStatusMsg, dbv.ptszVal, SIZEOF(contact->szStatusMsg));
diff --git a/plugins/Clist_mw/src/clc.h b/plugins/Clist_mw/src/clc.h index a64b3e055b..d48f962476 100644 --- a/plugins/Clist_mw/src/clc.h +++ b/plugins/Clist_mw/src/clc.h @@ -92,8 +92,8 @@ int AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); void FreeContact(struct ClcContact *p);
void RebuildEntireList(HWND hwnd,struct ClcData *dat);
ClcGroup *RemoveItemFromGroup(HWND hwnd,ClcGroup *group,struct ClcContact *contact,int updateTotalCount);
-void DeleteItemFromTree(HWND hwnd, HCONTACT hItem);
-void AddContactToTree(HWND hwnd, struct ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline);
+void DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
+void AddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort);
int GetGroupContentsCount(ClcGroup *group,int visibleOnly);
int GetNewSelection(ClcGroup *group,int selection, int direction);
@@ -124,8 +124,8 @@ void UnregisterFileDropping(HWND hwnd); //cluiservices.c
void FreeProtocolData( void );
-int GetContactCachedStatus(HCONTACT hContact);
-char *GetContactCachedProtocol(HCONTACT hContact);
+int GetContactCachedStatus(MCONTACT hContact);
+char *GetContactCachedProtocol(MCONTACT hContact);
#define CLUI_SetDrawerService "CLUI/SETDRAWERSERVICE"
typedef struct {
diff --git a/plugins/Clist_mw/src/clcidents.cpp b/plugins/Clist_mw/src/clcidents.cpp index 20c361e321..967e13abd3 100644 --- a/plugins/Clist_mw/src/clcidents.cpp +++ b/plugins/Clist_mw/src/clcidents.cpp @@ -80,7 +80,7 @@ int GetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex) return -1;
}
-ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,HCONTACT hContact)
+ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,MCONTACT hContact)
{
if (hContact == 0)
return NULL;
@@ -107,11 +107,11 @@ ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,HCONTACT hContact) return (pdnce);
}
-void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact)
+void ClearClcContactCache(struct ClcData *dat,MCONTACT hContact)
{
ClcCacheEntry *cacheEntry;
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
int i,tick;
tick = GetTickCount();
@@ -133,7 +133,7 @@ void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact) }
}
-void SetClcContactCacheItem(struct ClcData *dat, HCONTACT hContact, void *contact)
+void SetClcContactCacheItem(struct ClcData *dat, MCONTACT hContact, void *contact)
{
ClcCacheEntry *cacheEntry;
if ( !IsHContactGroup(hContact) && !IsHContactInfo(hContact)) {
@@ -153,7 +153,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **c if (isVisible == NULL && hItem != NULL && subgroup == NULL && !IsHContactGroup(hItem) && !IsHContactInfo(hItem)) {
//try use cache
- ClcCacheEntry *cacheEntry = GetCLCFullCacheEntry(dat, (HCONTACT)hItem);
+ ClcCacheEntry *cacheEntry = GetCLCFullCacheEntry(dat, (MCONTACT)hItem);
if (cacheEntry != NULL) {
if (cacheEntry->ClcContact == NULL) {
int *isv = {0};
@@ -216,7 +216,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **c if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT &&
group->cl.items[group->scanIndex]->SubAllocated>0)
for (i = 1; i<=group->cl.items[group->scanIndex]->SubAllocated; i++)
- if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == (HCONTACT)hItem) {
+ if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == (MCONTACT)hItem) {
if (contact) *contact = &group->cl.items[group->scanIndex]->subcontacts[i-1];
if (subgroup) *subgroup = group;
return 1;
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index ff0e148a15..93359b6deb 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -36,7 +36,7 @@ extern void (*saveFreeGroup)(ClcGroup *p); //routines for managing adding/removal of items in the list, including sorting
-extern void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact);
+extern void ClearClcContactCache(struct ClcData *dat,MCONTACT hContact);
void AddSubcontacts(struct ClcContact * cont)
{
@@ -51,7 +51,7 @@ void AddSubcontacts(struct ClcContact * cont) cont->SubAllocated = subcount;
i = 0;
for (j = 0; j<subcount; j++) {
- HCONTACT hsub = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j);
+ MCONTACT hsub = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j);
cacheEntry = GetContactFullCacheEntry(hsub);
if ( !(db_get_b(NULL,"CLC","MetaHideOfflineSub",1) && db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) ||
cacheEntry->status != ID_STATUS_OFFLINE )
@@ -114,7 +114,7 @@ static struct ClcContact* AddContactToGroup(struct ClcData *dat,ClcGroup *group, char *szProto;
WORD apparentMode;
DWORD idleMode;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
int i;
int img = -1;
@@ -182,7 +182,7 @@ static struct ClcContact* AddContactToGroup(struct ClcData *dat,ClcGroup *group, return group->cl.items[i];
}
-void AddContactToTree(HWND hwnd, ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline)
+void AddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline)
{
if ( FindItem(hwnd,dat,(HANDLE)hContact,NULL,NULL,NULL) == 1)
return;
@@ -274,7 +274,7 @@ ClcGroup *RemoveItemFromGroup(HWND hwnd,ClcGroup *group,struct ClcContact *conta return group;
}
-void DeleteItemFromTree(HWND hwnd, HCONTACT hItem)
+void DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
{
struct ClcContact *contact;
ClcGroup *group;
@@ -326,7 +326,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) int tick = GetTickCount();
ClearRowByIndexCache();
- ClearClcContactCache(dat, (HCONTACT)INVALID_HANDLE_VALUE);
+ ClearClcContactCache(dat, INVALID_CONTACT_ID);
dat->list.expanded = 1;
dat->list.hideOffline = db_get_b(NULL,"CLC","HideOfflineRoot",0);
@@ -348,7 +348,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) }
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *cacheEntry;
cont = NULL;
cacheEntry = GetContactFullCacheEntry(hContact);
@@ -513,7 +513,7 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort) struct SavedContactState_t
{
- HCONTACT hContact;
+ MCONTACT hContact;
WORD iExtraImage[EXTRA_ICON_COUNT];
int checked;
};
diff --git a/plugins/Clist_mw/src/clist.h b/plugins/Clist_mw/src/clist.h index 7b7b2e1589..dad33fa285 100644 --- a/plugins/Clist_mw/src/clist.h +++ b/plugins/Clist_mw/src/clist.h @@ -26,12 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CLIST_H_
void LoadContactTree(void);
-int ExtIconFromStatusMode(HCONTACT hContact, const char *szProto,int status);
-HTREEITEM GetTreeItemByHContact(HCONTACT hContact);
+int ExtIconFromStatusMode(MCONTACT hContact, const char *szProto,int status);
+HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
void TrayIconUpdateWithImageList(int iImage,const char *szNewTip,char *szPreferredProto);
void SortContacts(void);
-void ChangeContactIcon(HCONTACT hContact,int iIcon,int add);
-int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status);
+void ChangeContactIcon(MCONTACT hContact,int iIcon,int add);
+int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status);
struct ClcCacheEntry : public ClcCacheEntryBase
{
@@ -50,6 +50,6 @@ struct ClcCacheEntry : public ClcCacheEntryBase boolean isUnknown;
};
-ClcCacheEntry* GetContactFullCacheEntry(HCONTACT hContact);
+ClcCacheEntry* GetContactFullCacheEntry(MCONTACT hContact);
#endif
\ No newline at end of file diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index be79bfcfcf..13720def98 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -42,17 +42,17 @@ extern BYTE nameOrder[]; static HANDLE hSettingChanged, hProtoAckHook;
/////////// End by FYR ////////
-int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact)
+int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact)
{
int result = -1;
if (hContact && szProto) {
char * szActProto = (char*)szProto;
int nActStatus = nStatus;
- HCONTACT hActContact = hContact;
+ MCONTACT hActContact = hContact;
if ( !db_get_b(NULL,"CLC","Meta",0) && !strcmp(szActProto,"MetaContacts")) {
// substitute params by mostonline contact datas
- HCONTACT hMostOnlineContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0);
- if (hMostOnlineContact && hMostOnlineContact != (HCONTACT)CALLSERVICE_NOTFOUND) {
+ MCONTACT hMostOnlineContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0);
+ if (hMostOnlineContact && hMostOnlineContact != (MCONTACT)CALLSERVICE_NOTFOUND) {
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hMostOnlineContact);
if (cacheEntry && cacheEntry->szProto) {
szActProto = cacheEntry->szProto;
@@ -75,14 +75,14 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact) ////////// By FYR/////////////
-int ExtIconFromStatusMode(HCONTACT hContact, const char *szProto,int status)
+int ExtIconFromStatusMode(MCONTACT hContact, const char *szProto,int status)
{
/* if ( db_get_b( NULL, "CLC", "Meta", 0 ) == 1 )
return pcli->pfnIconFromStatusMode(szProto,status,hContact);
if ( szProto != NULL ) {
if (strcmp(szProto,"MetaContacts") == 0 ) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(UINT)hContact,0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(UINT)hContact,0);
if ( hContact != 0 ) {
szProto = GetContactProto((UINT)hContact,0);
status = db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE);
@@ -128,7 +128,7 @@ static int ContactListShutdownProc(WPARAM wParam,LPARAM lParam) int LoadContactListModule(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_set_s(hContact, "CList", "StatusMsg", "");
hCListImages = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index c85b67c4f2..1d6d5917f5 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -51,7 +51,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
case WM_USER+1:
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING * ws = (DBCONTACTWRITESETTING *)lParam;
if ( hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL
&& lstrcmpiA(ws->szModule,"CList") == 0 && lstrcmpiA(ws->szSetting,"UseGroups") == 0
diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index 29a14487cf..43883dfd95 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -25,12 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
#include "clist.h"
-TCHAR *GetNameForContact(HCONTACT hContact,int flag,boolean *isUnknown);
-char *GetProtoForContact(HCONTACT hContact);
-int GetStatusForContact(HCONTACT hContact,char *szProto);
+TCHAR *GetNameForContact(MCONTACT hContact,int flag,boolean *isUnknown);
+char *GetProtoForContact(MCONTACT hContact);
+int GetStatusForContact(MCONTACT hContact,char *szProto);
TCHAR *UnknownConctactTranslatedName;
extern boolean OnModulesLoadedCalled;
-void InvalidateDisplayNameCacheEntryByPDNE(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType);
+void InvalidateDisplayNameCacheEntryByPDNE(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType);
static int handleCompare( ClcCacheEntry* c1, ClcCacheEntry* c2 )
{
@@ -46,7 +46,7 @@ void InitDisplayNameCache(SortedList *list) list->increment = CallService(MS_DB_CONTACT_GETCOUNT,0,0)+1;
i = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *pdnce = (ClcCacheEntry *)mir_calloc(sizeof(ClcCacheEntry));
pdnce->hContact = hContact;
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,0);
@@ -143,7 +143,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) pdnce->IsExpanded = db_get_b(pdnce->hContact,"CList","Expanded",0);
}
-void InvalidateDisplayNameCacheEntryByPDNE(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType)
+void InvalidateDisplayNameCacheEntryByPDNE(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType)
{
if ( hContact == NULL || pdnce == NULL )
return;
@@ -192,7 +192,7 @@ void InvalidateDisplayNameCacheEntryByPDNE(HCONTACT hContact,ClcCacheEntry *pdnc pdnce->IsExpanded = -1;
}
-char *GetContactCachedProtocol(HCONTACT hContact)
+char *GetContactCachedProtocol(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry&&cacheEntry->szProto)
@@ -201,21 +201,21 @@ char *GetContactCachedProtocol(HCONTACT hContact) return NULL;
}
-char *GetProtoForContact(HCONTACT hContact)
+char *GetProtoForContact(MCONTACT hContact)
{
return mir_strdup(GetContactProto(hContact));
}
-int GetStatusForContact(HCONTACT hContact,char *szProto)
+int GetStatusForContact(MCONTACT hContact,char *szProto)
{
int status = ID_STATUS_OFFLINE;
if (szProto)
- status = db_get_w((HCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ status = db_get_w((MCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
return (status);
}
-TCHAR* GetNameForContact(HCONTACT hContact,int flag,boolean *isUnknown)
+TCHAR* GetNameForContact(MCONTACT hContact,int flag,boolean *isUnknown)
{
TCHAR* result = pcli->pfnGetContactDisplayName(hContact, flag | GCDNF_NOCACHE);
@@ -229,7 +229,7 @@ TCHAR* GetNameForContact(HCONTACT hContact,int flag,boolean *isUnknown) return result;
}
-ClcCacheEntry *GetContactFullCacheEntry(HCONTACT hContact)
+ClcCacheEntry *GetContactFullCacheEntry(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL)
@@ -238,7 +238,7 @@ ClcCacheEntry *GetContactFullCacheEntry(HCONTACT hContact) return NULL;
}
-int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status)
+int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL)
@@ -250,7 +250,7 @@ int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Stat return 0;
}
-int GetContactCachedStatus(HCONTACT hContact)
+int GetContactCachedStatus(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry&&cacheEntry->status != 0) return cacheEntry->status;
@@ -260,7 +260,7 @@ int GetContactCachedStatus(HCONTACT hContact) int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// Early exit
if (hContact == NULL)
@@ -315,7 +315,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if ( !strcmp(cws->szSetting,"Hidden")) {
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact, szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)), 1); //by FYR
}
}
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index 1dffd90f71..4ed273132a 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -93,7 +93,7 @@ static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam) PostMessage(pcli->hwndContactList,M_CREATECLC,0,0);
OnModulesLoadedCalled = TRUE;
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE);
+ pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID);
InitGroupMenus();
RegisterProtoIconsForAllProtoIconLib();
return 0;
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h index 70dffe6570..ed78d84707 100644 --- a/plugins/Clist_mw/src/commonheaders.h +++ b/plugins/Clist_mw/src/commonheaders.h @@ -88,7 +88,7 @@ extern int __cdecl MyStrCmpiT(const TCHAR *a, const TCHAR *b); extern DWORD exceptFunction(LPEXCEPTION_POINTERS EP);
-extern int (*saveIconFromStatusMode)(const char *szProto, int nStatus, HCONTACT hContact);
+extern int (*saveIconFromStatusMode)(const char *szProto, int nStatus, MCONTACT hContact);
//from bkg options
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index a41cc99992..fa87740548 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -27,8 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "clist.h"
extern HANDLE hContactIconChangedEvent;
-extern int GetContactCachedStatus(HCONTACT hContact);
-extern char *GetContactCachedProtocol(HCONTACT hContact);
+extern int GetContactCachedStatus(MCONTACT hContact);
+extern char *GetContactCachedProtocol(MCONTACT hContact);
int sortByStatus;
static int sortByProto;
@@ -47,7 +47,7 @@ struct { {ID_STATUS_ONTHEPHONE,150},
{ID_STATUS_OUTTOLUNCH,425}};
-static int GetContactStatus(HCONTACT hContact)
+static int GetContactStatus(MCONTACT hContact)
{
/*
@@ -60,7 +60,7 @@ static int GetContactStatus(HCONTACT hContact) return (GetContactCachedStatus(hContact));
}
-void ChangeContactIcon(HCONTACT hContact,int iIcon,int add)
+void ChangeContactIcon(MCONTACT hContact,int iIcon,int add)
{
//clui MS_CLUI_CONTACTADDED MS_CLUI_CONTACTSETICON this methods is null
//CallService(add?MS_CLUI_CONTACTADDED:MS_CLUI_CONTACTSETICON,(WPARAM)hContact,iIcon);
@@ -87,7 +87,7 @@ void LoadContactTree(void) int hideOffline = db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *cacheEntry = GetContactFullCacheEntry(hContact);
if (cacheEntry == NULL) {
MessageBoxA(0,"Fail To Get CacheEntry for hContact","!!!!!",0);
@@ -114,7 +114,7 @@ void LoadContactTree(void) int CompareContacts( const struct ClcContact *contact1, const struct ClcContact *contact2 )
{
- HCONTACT a = contact1->hContact, b = contact2->hContact;
+ MCONTACT a = contact1->hContact, b = contact2->hContact;
TCHAR *namea,*nameb;
int statusa,statusb;
char *szProto1,*szProto2;
@@ -167,7 +167,7 @@ void SortContacts(void) INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CallService(MS_CLUI_CONTACTDELETED,wParam,0);
if ((HANDLE)lParam == NULL)
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp index 940927a4b3..78b9f51a9a 100644 --- a/plugins/Clist_mw/src/init.cpp +++ b/plugins/Clist_mw/src/init.cpp @@ -67,8 +67,8 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort); INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam,LPARAM lParam);
INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam);
-int (*saveIconFromStatusMode)(const char *szProto,int nStatus, HCONTACT hContact);
-int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact);
+int (*saveIconFromStatusMode)(const char *szProto,int nStatus, MCONTACT hContact);
+int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact);
//from clcfonts
void RegisterCListFonts( void );
@@ -140,7 +140,7 @@ static struct ClcContact* fnCreateClcContact( void ) return (struct ClcContact*)mir_calloc( sizeof( struct ClcContact ));
}
-static ClcCacheEntry *fnCreateCacheItem(HCONTACT hContact )
+static ClcCacheEntry *fnCreateCacheItem(MCONTACT hContact )
{
ClcCacheEntry *p = (ClcCacheEntry *)mir_calloc( sizeof( ClcCacheEntry ));
if ( p )
|