From 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 20:47:51 +0000 Subject: HCONTACT is not needed anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/Include/clc.h | 18 ++++----- plugins/Clist_nicer/src/Include/clist.h | 4 +- plugins/Clist_nicer/src/Include/config.h | 22 +++++------ plugins/Clist_nicer/src/clc.cpp | 64 ++++++++++++++++---------------- plugins/Clist_nicer/src/clcidents.cpp | 4 +- plugins/Clist_nicer/src/clcitems.cpp | 22 +++++------ plugins/Clist_nicer/src/clistevents.cpp | 4 +- plugins/Clist_nicer/src/clistmenus.cpp | 6 +-- plugins/Clist_nicer/src/clistmod.cpp | 8 ++-- plugins/Clist_nicer/src/clistopts.cpp | 2 +- plugins/Clist_nicer/src/clui.cpp | 10 ++--- plugins/Clist_nicer/src/config.cpp | 22 +++++------ plugins/Clist_nicer/src/contact.cpp | 10 ++--- plugins/Clist_nicer/src/extBackg.cpp | 2 +- plugins/Clist_nicer/src/init.cpp | 12 +++--- plugins/Clist_nicer/src/viewmodes.cpp | 12 +++--- 16 files changed, 111 insertions(+), 111 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/src/Include/clc.h b/plugins/Clist_nicer/src/Include/clc.h index afb5a7ece5..9bec318541 100644 --- a/plugins/Clist_nicer/src/Include/clc.h +++ b/plugins/Clist_nicer/src/Include/clc.h @@ -103,7 +103,7 @@ typedef struct _OrderTreeData struct TExtraCache { - HCONTACT hContact; + MCONTACT hContact; HANDLE hTimeZone; BYTE valid; TCHAR *statusMsg; @@ -121,7 +121,7 @@ struct ClcContact : public ClcContactBase BOOL bIsMeta; BYTE xStatus; int xStatusIcon; - HCONTACT hSubContact; + MCONTACT hSubContact; char *metaProto; DWORD codePage; WORD wStatus; @@ -233,7 +233,7 @@ struct TCluiData { HMENU hMenuNotify; int iLastEventAdded; int wNextMenuID; - HCONTACT hUpdateContact; + MCONTACT hUpdateContact; DWORD sortTimer; TCHAR *szNoEvents; BOOL forceResize; @@ -329,7 +329,7 @@ struct IconDesc { }; struct NotifyMenuItemExData { - HCONTACT hContact; + MCONTACT hContact; int iIcon; // icon index in the image list HICON hIcon; // corresponding icon handle HANDLE hDbEvent; @@ -357,7 +357,7 @@ HANDLE ContactToItemHandle(ClcContact *contact, DWORD *nmFlags); //clcitems.c void RebuildEntireList(HWND hwnd, struct ClcData *dat); -DWORD INTSORT_GetLastMsgTime(HCONTACT hContact); +DWORD INTSORT_GetLastMsgTime(MCONTACT hContact); //clcmsgs.c LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); @@ -409,10 +409,10 @@ void ConfigureEventArea(HWND hwnd); void ClearIcons(int mode); void SkinDrawBg(HWND hwnd, HDC hdc); int GetBasicFontID(ClcContact * contact); -extern int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szStatus, struct ClcData *dat); +extern int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, struct ClcData *dat); void CreateViewModeFrame(); -int GetExtraCache(HCONTACT hContact, char *szProto); -void ReloadExtraInfo(HCONTACT hContact); +int GetExtraCache(MCONTACT hContact, char *szProto); +void ReloadExtraInfo(MCONTACT hContact); void LoadAvatarForContact(ClcContact *p); void ApplyViewMode(const char *name); @@ -425,7 +425,7 @@ void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int in void Reload3dBevelColors(); void ReloadThemedOptions(); void SetButtonToSkinned(); -void RTL_DetectAndSet(ClcContact *contact, HCONTACT hContact); +void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact); void RTL_DetectGroupName(ClcContact *group); void CLN_LoadAllIcons(BOOL mode); void ReloadSkinItemsToCache(); diff --git a/plugins/Clist_nicer/src/Include/clist.h b/plugins/Clist_nicer/src/Include/clist.h index 51c769d031..6f85122933 100644 --- a/plugins/Clist_nicer/src/Include/clist.h +++ b/plugins/Clist_nicer/src/Include/clist.h @@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ void LoadContactTree(void); -int IconFromStatusMode(const char *szProto, int status, HCONTACT hContact, HICON *phIcon); -HTREEITEM GetTreeItemByHContact(HCONTACT hContact); +int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON *phIcon); +HTREEITEM GetTreeItemByHContact(MCONTACT hContact); void SortContacts(void); #define CLUIINTM_REDRAW (WM_USER+100) diff --git a/plugins/Clist_nicer/src/Include/config.h b/plugins/Clist_nicer/src/Include/config.h index e40a92d36c..30317670ec 100644 --- a/plugins/Clist_nicer/src/Include/config.h +++ b/plugins/Clist_nicer/src/Include/config.h @@ -52,34 +52,34 @@ class cfg public: static void init(); - static DWORD getDword(const HCONTACT hContact, const char *szModule, const char *szSetting, DWORD uDefault); + static DWORD getDword(const MCONTACT 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 HCONTACT hContact, const char *szModule, const char *szSetting, WORD uDefault); + static WORD getWord(const MCONTACT 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 HCONTACT hContact, const char *szModule, const char *szSetting, int uDefault); + static int getByte(const MCONTACT 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 HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); - static INT_PTR getString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); + static INT_PTR getTString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); + static INT_PTR getString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); - static INT_PTR writeDword(const HCONTACT hContact, const char *szModule, const char *szSetting, DWORD value); + static INT_PTR writeDword(const MCONTACT 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 HCONTACT hContact, const char *szModule, const char *szSetting, WORD value); + static INT_PTR writeWord(const MCONTACT 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 HCONTACT hContact, const char *szModule, const char *szSetting, BYTE value); + static INT_PTR writeByte(const MCONTACT 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 HCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *st); - static INT_PTR writeString(const HCONTACT hContact, const char *szModule, const char *szSetting, const char *st); + static INT_PTR writeTString(const MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *st); + static INT_PTR writeString(const MCONTACT hContact, const char *szModule, const char *szSetting, const char *st); - static TExtraCache* getCache(const HCONTACT hContact, const char *szProto); + static TExtraCache* getCache(const MCONTACT hContact, const char *szProto); public: static TCluiData dat; diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 973cb5a267..a80632ae94 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -46,7 +46,7 @@ static HRESULT(WINAPI *MyCloseThemeData)(HANDLE); LONG g_cxsmIcon, g_cysmIcon; -void SetDBButtonStates(HCONTACT hContact); +void SetDBButtonStates(MCONTACT hContact); HMENU BuildGroupPopupMenu(ClcGroup* group) { @@ -78,14 +78,14 @@ static int ClcEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get((HANDLE)lParam, &dbei); if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) { - DWORD firstTime = cfg::getDword((HCONTACT)wParam, "CList", "mf_firstEvent", 0); - DWORD count = cfg::getDword((HCONTACT)wParam, "CList", "mf_count", 0); + DWORD firstTime = cfg::getDword((MCONTACT)wParam, "CList", "mf_firstEvent", 0); + DWORD count = cfg::getDword((MCONTACT)wParam, "CList", "mf_count", 0); count++; new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff; - cfg::writeDword((HCONTACT)wParam, "CList", "mf_freq", new_freq); - cfg::writeDword((HCONTACT)wParam, "CList", "mf_count", count); + cfg::writeDword((MCONTACT)wParam, "CList", "mf_freq", new_freq); + cfg::writeDword((MCONTACT)wParam, "CList", "mf_count", count); - TExtraCache *p = cfg::getCache((HCONTACT)wParam, NULL); + TExtraCache *p = cfg::getCache((MCONTACT)wParam, NULL); if (p) { p->dwLastMsgTime = dbei.timestamp; if (new_freq) @@ -111,9 +111,9 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) if ( !__strcmp(cws->szSetting, "ANSIcodepage")) pcli->pfnClcBroadcast(INTM_CODEPAGECHANGED, wParam, lParam); else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName")) - ReloadExtraInfo((HCONTACT)wParam); + ReloadExtraInfo((MCONTACT)wParam); } - else if (wParam != 0 && (szProto = GetContactProto((HCONTACT)wParam)) != NULL) { + else if (wParam != 0 && (szProto = GetContactProto((MCONTACT)wParam)) != NULL) { char *id = NULL; if ( !__strcmp(cws->szModule, "Protocol") && !__strcmp(cws->szSetting, "p")) { char *szProto_s; @@ -122,24 +122,24 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) szProto_s = NULL; else szProto_s = cws->value.pszVal; - pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord((HCONTACT)wParam, szProto_s, "Status", ID_STATUS_OFFLINE), (HCONTACT)wParam, NULL), 0); + pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord((MCONTACT)wParam, szProto_s, "Status", ID_STATUS_OFFLINE), (MCONTACT)wParam, NULL), 0); } // something is being written to a protocol module if ( !__strcmp(szProto, cws->szModule)) { // was a unique setting key written? - pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam); + pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam); if ( !__strcmp(cws->szSetting, "Status")) { - if (!cfg::getByte((HCONTACT)wParam, "CList", "Hidden", 0)) { + if (!cfg::getByte((MCONTACT)wParam, "CList", "Hidden", 0)) { if (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) { // User's state is changing, and we are hideOffline-ing if (cws->value.wVal == ID_STATUS_OFFLINE) { - pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (HCONTACT)wParam, NULL), 0); + pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 0); CallService(MS_CLUI_CONTACTDELETED, wParam, 0); return 0; } - pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (HCONTACT)wParam, NULL), 1); + pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 1); } - pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (HCONTACT)wParam, NULL), 0); + pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 0); } SendMessage(pcli->hwndContactTree, INTM_STATUSCHANGED, wParam, lParam); return 0; @@ -149,7 +149,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) else if (strstr(cws->szSetting, "XStatus")) SendMessage(pcli->hwndContactTree, INTM_XSTATUSCHANGED, wParam, lParam); else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName")) - ReloadExtraInfo((HCONTACT)wParam); + ReloadExtraInfo((MCONTACT)wParam); if (cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS) && !__strcmp(szProto, cfg::dat.szMetaName)) { if ((lstrlenA(cws->szSetting) > 6 && !strncmp(cws->szSetting, "Status", 6)) || strstr("Default,ForceSend,Nick", cws->szSetting)) @@ -288,9 +288,9 @@ LBL_Def: memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage)); flags = contact->flags; } - pcli->pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam); - if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HCONTACT)wParam, NULL, dat)) { - pcli->pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1); + pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam); + if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((MCONTACT)wParam, NULL, dat)) { + pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1); if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) { memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage)); if (flags & CONTACTF_CHECKED) @@ -313,10 +313,10 @@ LBL_Def: case INTM_ICONCHANGED: { int recalcScrollBar = 0; - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; WORD status = ID_STATUS_OFFLINE; int contactRemoved = 0; - HCONTACT hSelItem = NULL; + MCONTACT hSelItem = NULL; ClcContact *selcontact = NULL; char *szProto = GetContactProto(hContact); @@ -332,7 +332,7 @@ LBL_Def: if (!FindItem(hwnd, dat, (HANDLE)hContact, &contact, &group, NULL)) { if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) { if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1) - hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact); + hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact); pcli->pfnAddContactToTree(hwnd, dat, hContact, 0, 0); recalcScrollBar = 1; FindItem(hwnd, dat, (HANDLE)hContact, &contact, NULL, NULL); @@ -349,7 +349,7 @@ LBL_Def: break; if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1) - hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact); + hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact); pcli->pfnRemoveItemFromGroup(hwnd, group, contact, 0); contactRemoved = TRUE; recalcScrollBar = 1; @@ -382,7 +382,7 @@ LBL_Def: break; if (contact->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) { - contact->hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)contact->hContact, 0); + contact->hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)contact->hContact, 0); contact->metaProto = GetContactProto(contact->hSubContact); contact->iImage = pcli->pfnGetContactIcon(contact->hSubContact); if (contact->pExtra) { @@ -412,7 +412,7 @@ LBL_Def: ClcContact *contact; if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) break; - lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText)); + lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText)); RTL_DetectAndSet(contact, 0); @@ -423,7 +423,7 @@ LBL_Def: case INTM_CODEPAGECHANGED: if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) break; - contact->codePage = cfg::getDword((HCONTACT)wParam, "Tab_SRMsg", "ANSIcodepage", cfg::getDword((HCONTACT)wParam, "UserInfo", "ANSIcodepage", CP_ACP)); + contact->codePage = cfg::getDword((MCONTACT)wParam, "Tab_SRMsg", "ANSIcodepage", cfg::getDword((MCONTACT)wParam, "UserInfo", "ANSIcodepage", CP_ACP)); PostMessage(hwnd, INTM_INVALIDATE, 0, 0); goto LBL_Def; @@ -467,7 +467,7 @@ LBL_Def: char *szProto = NULL; if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) - p = cfg::getCache((HCONTACT)wParam, NULL); + p = cfg::getCache((MCONTACT)wParam, NULL); else { p = contact->pExtra; szProto = contact->proto; @@ -479,7 +479,7 @@ LBL_Def: case INTM_STATUSCHANGED: if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) { - WORD wStatus = cfg::getWord((HCONTACT)wParam, contact->proto, "Status", ID_STATUS_OFFLINE); + WORD wStatus = cfg::getWord((MCONTACT)wParam, contact->proto, "Status", ID_STATUS_OFFLINE); if (cfg::dat.bNoOfflineAvatars && wStatus != ID_STATUS_OFFLINE && contact->wStatus == ID_STATUS_OFFLINE) { contact->wStatus = wStatus; if (cfg::dat.bAvatarServiceAvail && contact->ace == NULL) @@ -494,9 +494,9 @@ LBL_Def: if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) break; - contact->proto = GetContactProto((HCONTACT)wParam); + contact->proto = GetContactProto((MCONTACT)wParam); CallService(MS_CLIST_INVALIDATEDISPLAYNAME, wParam, 0); - lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText)); + lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText)); RTL_DetectAndSet(contact, 0); @@ -545,7 +545,7 @@ LBL_Def: break; contact->flags &= ~CONTACTF_IDLE; - if (cfg::getDword((HCONTACT)wParam, szProto, "IdleTS", 0)) { + if (cfg::getDword((MCONTACT)wParam, szProto, "IdleTS", 0)) { contact->flags |= CONTACTF_IDLE; } PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)contact->hContact); @@ -557,14 +557,14 @@ LBL_Def: { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; char *szProto = (char *)cws->szModule; - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; TExtraCache *p; if (!FindItem(hwnd, dat, (HANDLE)hContact, &contact, NULL, NULL)) { p = cfg::getCache(hContact, szProto); if (!dat->bisEmbedded && cfg::dat.bMetaAvail && szProto) { // may be a subcontact, forward the xstatus if (cfg::getByte(hContact, cfg::dat.szMetaName, "IsSubcontact", 0)) { - HCONTACT hMasterContact = (HCONTACT)cfg::getDword(hContact, cfg::dat.szMetaName, "Handle", 0); + MCONTACT hMasterContact = (MCONTACT)cfg::getDword(hContact, cfg::dat.szMetaName, "Handle", 0); if (hMasterContact && hMasterContact != hContact) // avoid recursive call of settings handler cfg::writeByte(hMasterContact, cfg::dat.szMetaName, "XStatusId", (BYTE)cfg::getByte(hContact, szProto, "XStatusId", 0)); diff --git a/plugins/Clist_nicer/src/clcidents.cpp b/plugins/Clist_nicer/src/clcidents.cpp index 18dae02c34..dc9d34b7c0 100644 --- a/plugins/Clist_nicer/src/clcidents.cpp +++ b/plugins/Clist_nicer/src/clcidents.cpp @@ -66,8 +66,8 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, if (nowVisible) index++; if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR) hItem & ~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) || - (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == (HCONTACT)hItem) || - (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HCONTACT)((UINT_PTR) hItem & ~HCONTACT_ISINFO))) + (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == (MCONTACT)hItem) || + (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR) hItem & ~HCONTACT_ISINFO))) { if (isVisible) { if ( !nowVisible) diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 4f01d00972..856dfe77e7 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include -extern int ( *saveAddContactToGroup )(struct ClcData *dat, ClcGroup *group, HCONTACT hContact); +extern int ( *saveAddContactToGroup )(struct ClcData *dat, ClcGroup *group, MCONTACT hContact); extern int ( *saveAddInfoItemToGroup )(ClcGroup *group, int flags, const TCHAR *pszText); extern ClcGroup* ( *saveRemoveItemFromGroup )(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount); extern ClcGroup* ( *saveAddGroup )(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers); -static void TZ_LoadTimeZone(HCONTACT hContact, struct TExtraCache *c, const char *szProto); +static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c, const char *szProto); //routines for managing adding/removal of items in the list, including sorting @@ -92,7 +92,7 @@ void LoadAvatarForContact(ClcContact *p) p->cFlags &= ~ECF_AVATAR; } -int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact) +int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact) { int i = saveAddContactToGroup(dat, group, hContact); ClcContact* p = group->cl.items[i]; @@ -105,7 +105,7 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact) else p->bIsMeta = FALSE; if (p->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) { - p->hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0); + p->hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0); p->metaProto = GetContactProto(p->hSubContact); p->iImage = pcli->pfnGetContactIcon(p->hSubContact); } @@ -163,7 +163,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)) { if (style & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus(hContact, NULL, dat)) { ZeroMemory((void *)&dbv, sizeof(dbv)); if (cfg::getTString(hContact, "CList", "Group", &dbv)) @@ -228,7 +228,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) return 0; p->bStatusMsgValid = STATUSMSG_NOTFOUND; - HCONTACT hContact = p->hContact; + MCONTACT hContact = p->hContact; int result = cfg::getTString(hContact, "CList", "StatusMsg", &dbv); if ( !result && lstrlen(dbv.ptszVal) > 1) @@ -322,14 +322,14 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) * differences. */ -static void TZ_LoadTimeZone(HCONTACT hContact, struct TExtraCache *c, const char *szProto) +static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c, const char *szProto) { DWORD flags = 0; if (cfg::dat.bShowLocalTimeSelective) flags |= TZF_DIFONLY; c->hTimeZone = tmi.createByContact(hContact, flags); } -void ReloadExtraInfo(HCONTACT hContact) +void ReloadExtraInfo(MCONTACT hContact) { if (hContact && pcli->hwndContactTree) { TExtraCache *p = cfg::getCache(hContact, NULL); @@ -347,7 +347,7 @@ void ReloadExtraInfo(HCONTACT hContact) */ -void RTL_DetectAndSet(ClcContact *contact, HCONTACT hContact) +void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact) { WORD infoTypeC2[12]; int i; @@ -425,7 +425,7 @@ void GetExtendedInfo(ClcContact *contact, ClcData *dat) void LoadSkinItemToCache(TExtraCache *cEntry, const char *szProto) { - HCONTACT hContact = cEntry->hContact; + MCONTACT hContact = cEntry->hContact; if (cfg::getByte(hContact, "EXTBK", "VALID", 0)) { if (cEntry->status_item == NULL) @@ -462,7 +462,7 @@ void LoadSkinItemToCache(TExtraCache *cEntry, const char *szProto) * also cares about sub contacts (if meta is active) */ -int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szProto, struct ClcData *dat) +int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData *dat) { int dbHidden = cfg::getByte(hContact, "CList", "Hidden", 0); // default hidden state, always respect it. int filterResult = 1; diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index dd9870e7e4..613936a45d 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -29,7 +29,7 @@ static HWND hwndEventFrame = 0; HFONT __fastcall ChangeToFont(HDC hdc, struct ClcData *dat, int id, int *fontHeight); extern struct CListEvent* ( *saveAddEvent )(CLISTEVENT *cle); -extern int ( *saveRemoveEvent )(HCONTACT hContact, HANDLE hDbEvent); +extern int ( *saveRemoveEvent )(MCONTACT hContact, HANDLE hDbEvent); extern FRAMEWND *wndFrameEventArea; extern HPEN g_hPenCLUIFrames; @@ -333,7 +333,7 @@ struct CListEvent* AddEvent(CLISTEVENT *cle) // wParam=(WPARAM)(HANDLE)hContact // lParam=(LPARAM)(HANDLE)hDbEvent // Returns 0 if the event was successfully removed, or nonzero if the event was not found -int RemoveEvent(HCONTACT hContact, HANDLE hDbEvent) +int RemoveEvent(MCONTACT hContact, HANDLE hDbEvent) { HANDLE hItem; int i; diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 1fec1b1175..9526e4f946 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -68,7 +68,7 @@ static HANDLE hWindowListIGN = 0; static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA); + MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA); switch(msg) { case WM_INITDIALOG: @@ -78,7 +78,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA int pCaps; HWND hwndAdd; - hContact = (HCONTACT)lParam; + hContact = (MCONTACT)lParam; SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)hContact); dwMask = cfg::getDword(hContact, "Ignore", "Mask1", 0); SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, dwMask); @@ -365,7 +365,7 @@ static INT_PTR SetContactIgnore(WPARAM wParam, LPARAM lParam) if (hWindowListIGN == 0) hWindowListIGN = WindowList_Create(); - hWnd = WindowList_Find(hWindowListIGN, (HCONTACT)wParam); + hWnd = WindowList_Find(hWindowListIGN, (MCONTACT)wParam); if ( wParam ) { if ( hWnd == 0 ) CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_QUICKIGNORE), 0, IgnoreDialogProc, (LPARAM)wParam); diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index 2514716017..2a838b39dc 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -30,7 +30,7 @@ extern int RemoveEvent(WPARAM wParam, LPARAM lParam); int InitCustomMenus(void); void UninitCustomMenus(void); INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam); -int EventsProcessContactDoubleClick(HCONTACT hContact); +int EventsProcessContactDoubleClick(MCONTACT hContact); int SetHideOffline(WPARAM wParam, LPARAM lParam); extern HIMAGELIST hCListImages; @@ -44,9 +44,9 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam) return(g_maxStatus == ID_STATUS_OFFLINE ? pcli->currentDesiredStatusMode : g_maxStatus); } -extern int ( *saveIconFromStatusMode )( const char *szProto, int status, HCONTACT hContact ); +extern int ( *saveIconFromStatusMode )( const char *szProto, int status, MCONTACT hContact ); -int IconFromStatusMode(const char *szProto, int status, HCONTACT hContact, HICON *phIcon) +int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON *phIcon) { if (phIcon != NULL) *phIcon = NULL; @@ -55,7 +55,7 @@ int IconFromStatusMode(const char *szProto, int status, HCONTACT hContact, HICON int finalStatus; if (szProto != NULL && !strcmp(szProto, cfg::dat.szMetaName) && cfg::dat.bMetaAvail && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) { - HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0); + MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0); szFinalProto = GetContactProto(hSubContact); finalStatus = (status == 0) ? (WORD) cfg::getWord(hSubContact, szFinalProto, "Status", ID_STATUS_OFFLINE) : status; hContact = hSubContact; diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 5517524a5f..775a6b5c1c 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -39,7 +39,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP switch (msg) { 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 && IsWindowVisible(hwndDlg)) CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0); diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 72a579d453..5772d3a0a4 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -400,10 +400,10 @@ void ConfigureCLUIGeometry(int mode) * set the states of defined database action buttons (only if button is a toggle) */ -void SetDBButtonStates(HCONTACT hPassedContact) +void SetDBButtonStates(MCONTACT hPassedContact) { ButtonItem *buttonItem = g_ButtonItems; - HCONTACT hContact = 0, hFinalContact = 0; + MCONTACT hContact = 0, hFinalContact = 0; char *szModule, *szSetting; int sel = cfg::clcdat ? cfg::clcdat->selection : -1; ClcContact *contact = 0; @@ -714,7 +714,7 @@ int CustomDrawScrollBars(NMCSBCUSTOMDRAW *nmcsbcd) extern LRESULT(CALLBACK *saveContactListWndProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); -static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, HCONTACT hContact) +static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCONTACT hContact) { if (item->dwFlags & BUTTON_PASSHCONTACTW || item->dwFlags & BUTTON_PASSHCONTACTL || item->dwFlags & BUTTON_ISCONTACTDBACTION) { if (hContact == 0) @@ -1344,7 +1344,7 @@ skipbg: ButtonItem *item = g_ButtonItems; WPARAM wwParam = 0; LPARAM llParam = 0; - HCONTACT hContact = 0; + MCONTACT hContact = 0; ClcContact *contact = 0; int sel = cfg::clcdat ? cfg::clcdat->selection : -1; int serviceFailure = FALSE; @@ -1378,7 +1378,7 @@ skipbg: BYTE *pValue; char *szModule = item->szModule; char *szSetting = item->szSetting; - HCONTACT finalhContact = 0; + MCONTACT finalhContact = 0; if (item->dwFlags & BUTTON_ISCONTACTDBACTION || item->dwFlags & BUTTON_DBACTIONONCONTACT) { contactOK = ServiceParamsOK(item, &wwParam, &llParam, hContact); diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp index 189471c5e1..7ccb4840d4 100644 --- a/plugins/Clist_nicer/src/config.cpp +++ b/plugins/Clist_nicer/src/config.cpp @@ -52,7 +52,7 @@ void cfg::init() InitializeCriticalSection(&cachecs); } -DWORD cfg::getDword(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD uDefault = 0) +DWORD cfg::getDword(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD uDefault = 0) { return((DWORD)db_get_dw(hContact, szModule, szSetting, uDefault)); } @@ -76,7 +76,7 @@ DWORD cfg::getDword(const char *szModule, const char *szSetting, DWORD uDefault) } -WORD cfg::getWord(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD uDefault = 0) +WORD cfg::getWord(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD uDefault = 0) { return((WORD)db_get_w(hContact, szModule, szSetting, uDefault)); } @@ -102,7 +102,7 @@ WORD cfg::getWord(const char *szModule, const char *szSetting, WORD uDefault) /* * same for bytes now */ -int cfg::getByte(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, int uDefault = 0) +int cfg::getByte(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, int uDefault = 0) { return(db_get_b(hContact, szModule, szSetting, uDefault)); } @@ -117,12 +117,12 @@ int cfg::getByte(const char *szModule, const char *szSetting, int uDefault) return(db_get_b(0, szModule, szSetting, uDefault)); } -INT_PTR cfg::getTString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) +INT_PTR cfg::getTString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) { return(db_get_ts(hContact, szModule, szSetting, dbv)); } -INT_PTR cfg::getString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) +INT_PTR cfg::getString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) { return(db_get_s(hContact, szModule, szSetting, dbv)); } @@ -131,7 +131,7 @@ INT_PTR cfg::getString(const HCONTACT hContact, const char *szModule, const char * writer functions */ -INT_PTR cfg::writeDword(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD value = 0) +INT_PTR cfg::writeDword(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD value = 0) { return(db_set_dw(hContact, szModule, szSetting, value)); } @@ -141,7 +141,7 @@ INT_PTR cfg::writeDword(const char *szModule = 0, const char *szSetting = 0, DWO return(db_set_dw(0, szModule, szSetting, value)); } -INT_PTR cfg::writeWord(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD value = 0) +INT_PTR cfg::writeWord(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD value = 0) { return(db_set_w(hContact, szModule, szSetting, value)); } @@ -151,7 +151,7 @@ INT_PTR cfg::writeWord(const char *szModule = 0, const char *szSetting = 0, WORD return(db_set_w(0, szModule, szSetting, value)); } -INT_PTR cfg::writeByte(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, BYTE value = 0) +INT_PTR cfg::writeByte(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, BYTE value = 0) { return(db_set_b(hContact, szModule, szSetting, value)); } @@ -161,17 +161,17 @@ INT_PTR cfg::writeByte(const char *szModule = 0, const char *szSetting = 0, BYTE return(db_set_b(0, szModule, szSetting, value)); } -INT_PTR cfg::writeTString(const HCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const TCHAR *str = 0) +INT_PTR cfg::writeTString(const MCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const TCHAR *str = 0) { return(db_set_ts(hContact, szModule, szSetting, str)); } -INT_PTR cfg::writeString(const HCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const char *str = 0) +INT_PTR cfg::writeString(const MCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const char *str = 0) { return(db_set_s(hContact, szModule, szSetting, str)); } -TExtraCache* cfg::getCache(const HCONTACT hContact, const char *szProto) +TExtraCache* cfg::getCache(const MCONTACT hContact, const char *szProto) { int idx = cfg::arCache.getIndex((TExtraCache*)&hContact); if (idx != -1) diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 88d2defe08..1fb7fb9b9a 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -39,7 +39,7 @@ struct { {ID_STATUS_OUTTOLUNCH,425} }; -static int GetContactStatus(HCONTACT hContact) +static int GetContactStatus(MCONTACT hContact) { char *szProto; @@ -61,7 +61,7 @@ int __forceinline GetStatusModeOrdering(int statusMode) int mf_updatethread_running = TRUE; HANDLE hThreadMFUpdate = 0; -static void MF_CalcFrequency(HCONTACT hContact, DWORD dwCutoffDays, int doSleep) +static void MF_CalcFrequency(MCONTACT hContact, DWORD dwCutoffDays, int doSleep) { DWORD curTime = time(NULL); DWORD frequency, eventCount; @@ -109,7 +109,7 @@ void MF_UpdateThread(LPVOID) ResetEvent(hEvent); while(mf_updatethread_running) { - for (HCONTACT hContact = db_find_first(); hContact && mf_updatethread_running; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact && mf_updatethread_running; hContact = db_find_next(hContact)) { MF_CalcFrequency(hContact, 50, 1); if (mf_updatethread_running) WaitForSingleObject(hEvent, 5000); @@ -140,7 +140,7 @@ void LoadContactTree(void) hideOffline = cfg::getByte("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)) { status = GetContactStatus(hContact); if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL)) pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL), 1); @@ -162,7 +162,7 @@ void LoadContactTree(void) CallService(MS_CLUI_LISTENDREBUILD, 0, 0); } -DWORD INTSORT_GetLastMsgTime(HCONTACT hContact) +DWORD INTSORT_GetLastMsgTime(MCONTACT hContact) { HANDLE hDbEvent = db_event_last(hContact); while(hDbEvent) { diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 0ed8a12036..8fa7588976 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -1261,7 +1261,7 @@ void LoadPerContactSkins(TCHAR *tszFileName) } if (items) { - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { char *szProto = GetContactProto(hContact); if (szProto == NULL) continue; diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 683c2fd72f..28793ebcc6 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -57,8 +57,8 @@ int ClcShutdown(WPARAM wParam, LPARAM lParam); void (*saveLoadClcOptions)(HWND hwnd, struct ClcData *dat); void LoadClcOptions(HWND hwnd, struct ClcData *dat); -int (*saveAddContactToGroup)(struct ClcData *dat, ClcGroup *group, HCONTACT hContact); -int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact); +int (*saveAddContactToGroup)(struct ClcData *dat, ClcGroup *group, MCONTACT hContact); +int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact); CListEvent* (*saveAddEvent)(CLISTEVENT *cle); CListEvent* AddEvent(CLISTEVENT *cle); @@ -75,13 +75,13 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT message, WPARAM wParam, LPAR LRESULT (CALLBACK *saveContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -int (*saveIconFromStatusMode)(const char *szProto, int status, HCONTACT hContact); +int (*saveIconFromStatusMode)(const char *szProto, int status, MCONTACT hContact); LRESULT(*saveProcessExternalMessages)(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); -int (*saveRemoveEvent)(HCONTACT hContact, HANDLE hDbEvent); -int RemoveEvent(HCONTACT hContact, HANDLE hDbEvent); +int (*saveRemoveEvent)(MCONTACT hContact, HANDLE hDbEvent); +int RemoveEvent(MCONTACT hContact, HANDLE hDbEvent); INT_PTR (*saveTrayIconProcessMessage)(WPARAM wParam, LPARAM lParam); INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam); @@ -194,7 +194,7 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } -static int fnIconFromStatusMode(const char* szProto, int status, HCONTACT hContact) +static int fnIconFromStatusMode(const char* szProto, int status, MCONTACT hContact) { return IconFromStatusMode(szProto, status, hContact, NULL); } diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index c189db26bb..cd163a2f36 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -120,7 +120,7 @@ static void ShowPage(HWND hwnd, int page) } } -static int UpdateClistItem(HCONTACT hContact, DWORD mask) +static int UpdateClistItem(MCONTACT hContact, DWORD mask) { for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE, @@ -141,8 +141,8 @@ static DWORD GetMaskForItem(HANDLE hItem) static void UpdateStickies() { - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { - HCONTACT hItem = (HCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem) SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, cfg::getByte(hContact, "CLVM", g_szModename, 0) ? 1 : 0); DWORD localMask = HIWORD(cfg::getDword(hContact, "CLVM", g_szModename, 0)); @@ -393,7 +393,7 @@ void SaveState() SendDlgItemMessageA(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szModeName); dwGlobalMask = GetMaskForItem(hInfoItem); - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem) { if (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) { @@ -672,7 +672,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); SetWindowTextA(hwndSelector, Translate("No view mode")); } - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) if (cfg::getDword(hContact, "CLVM", szBuf, -1) != -1) cfg::writeDword(hContact, "CLVM", szBuf, 0); @@ -718,7 +718,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP } case IDC_CLEARALL: { - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0); -- cgit v1.2.3