From 862116c0d40a7304c458f68c4c725e8a95960588 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Feb 2014 13:18:53 +0000 Subject: valid first parameter's name of ME_DB_CONTACT_SETTINGCHANGED handlers git-svn-id: http://svn.miranda-ng.org/main/trunk@8255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/clc.cpp | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index f9550d81c4..9a21399db8 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -68,24 +68,24 @@ int __forceinline __strcmp(const char * src, const char * dst) return(ret); } -static int ClcEventAdded(WPARAM wParam, LPARAM lParam) +static int ClcEventAdded(WPARAM hContact, LPARAM lParam) { DWORD new_freq = 0; cfg::dat.t_now = time(NULL); - if (wParam && lParam) { + if (hContact && lParam) { DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get((HANDLE)lParam, &dbei); if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) { - DWORD firstTime = cfg::getDword(wParam, "CList", "mf_firstEvent", 0); - DWORD count = cfg::getDword(wParam, "CList", "mf_count", 0); + DWORD firstTime = cfg::getDword(hContact, "CList", "mf_firstEvent", 0); + DWORD count = cfg::getDword(hContact, "CList", "mf_count", 0); count++; new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff; - cfg::writeDword(wParam, "CList", "mf_freq", new_freq); - cfg::writeDword(wParam, "CList", "mf_count", count); + cfg::writeDword(hContact, "CList", "mf_freq", new_freq); + cfg::writeDword(hContact, "CList", "mf_count", count); - TExtraCache *p = cfg::getCache(wParam, NULL); + TExtraCache *p = cfg::getCache(hContact, NULL); if (p) { p->dwLastMsgTime = dbei.timestamp; if (new_freq) @@ -97,67 +97,67 @@ static int ClcEventAdded(WPARAM wParam, LPARAM lParam) return 0; } -static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) +static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) { char *szProto = NULL; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; - if (wParam) { + if (hContact) { if ( !__strcmp(cws->szModule, "CList")) { if ( !__strcmp(cws->szSetting, "StatusMsg")) - SendMessage(pcli->hwndContactTree, INTM_STATUSMSGCHANGED, wParam, lParam); + SendMessage(pcli->hwndContactTree, INTM_STATUSMSGCHANGED, hContact, lParam); } else if ( !__strcmp(cws->szModule, "UserInfo")) { if ( !__strcmp(cws->szSetting, "ANSIcodepage")) - pcli->pfnClcBroadcast(INTM_CODEPAGECHANGED, wParam, lParam); + pcli->pfnClcBroadcast(INTM_CODEPAGECHANGED, hContact, lParam); else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName")) - ReloadExtraInfo(wParam); + ReloadExtraInfo(hContact); } - else if (wParam != 0 && (szProto = GetContactProto(wParam)) != NULL) { + else if (hContact != 0 && (szProto = GetContactProto(hContact)) != NULL) { char *id = NULL; if ( !__strcmp(cws->szModule, "Protocol") && !__strcmp(cws->szSetting, "p")) { char *szProto_s; - pcli->pfnClcBroadcast(INTM_PROTOCHANGED, wParam, lParam); + pcli->pfnClcBroadcast(INTM_PROTOCHANGED, hContact, lParam); if (cws->value.type == DBVT_DELETED) szProto_s = NULL; else szProto_s = cws->value.pszVal; - pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord(wParam, szProto_s, "Status", ID_STATUS_OFFLINE), wParam, NULL), 0); + pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord(hContact, szProto_s, "Status", ID_STATUS_OFFLINE), hContact, NULL), 0); } // something is being written to a protocol module if ( !__strcmp(szProto, cws->szModule)) { // was a unique setting key written? - pcli->pfnInvalidateDisplayNameCacheEntry(wParam); + pcli->pfnInvalidateDisplayNameCacheEntry(hContact); if ( !__strcmp(cws->szSetting, "Status")) { - if (!cfg::getByte(wParam, "CList", "Hidden", 0)) { + if (!cfg::getByte(hContact, "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(wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, wParam, NULL), 0); - CallService(MS_CLUI_CONTACTDELETED, wParam, 0); + pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(cws->szModule, cws->value.wVal, hContact, NULL), 0); + CallService(MS_CLUI_CONTACTDELETED, hContact, 0); return 0; } - pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, wParam, NULL), 1); + pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(cws->szModule, cws->value.wVal, hContact, NULL), 1); } - pcli->pfnChangeContactIcon(wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, wParam, NULL), 0); + pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(cws->szModule, cws->value.wVal, hContact, NULL), 0); } - SendMessage(pcli->hwndContactTree, INTM_STATUSCHANGED, wParam, lParam); + SendMessage(pcli->hwndContactTree, INTM_STATUSCHANGED, hContact, lParam); return 0; } else if (strstr("YMsg|StatusDescr|XStatusMsg", cws->szSetting)) - SendMessage(pcli->hwndContactTree, INTM_STATUSMSGCHANGED, wParam, lParam); + SendMessage(pcli->hwndContactTree, INTM_STATUSMSGCHANGED, hContact, lParam); else if (strstr(cws->szSetting, "XStatus")) - SendMessage(pcli->hwndContactTree, INTM_XSTATUSCHANGED, wParam, lParam); + SendMessage(pcli->hwndContactTree, INTM_XSTATUSCHANGED, hContact, lParam); else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName")) - ReloadExtraInfo(wParam); + ReloadExtraInfo(hContact); 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)) - pcli->pfnClcBroadcast(INTM_NAMEORDERCHANGED, wParam, lParam); + pcli->pfnClcBroadcast(INTM_NAMEORDERCHANGED, hContact, lParam); } } if (cfg::dat.bMetaAvail && cfg::dat.bMetaEnabled && !__strcmp(cws->szModule, cfg::dat.szMetaName) && !__strcmp(cws->szSetting, "IsSubcontact")) - pcli->pfnClcBroadcast(INTM_HIDDENCHANGED, wParam, lParam); + pcli->pfnClcBroadcast(INTM_HIDDENCHANGED, hContact, lParam); } } else if (!__strcmp(cws->szModule, cfg::dat.szMetaName)) { @@ -178,7 +178,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) return 0; } -static int ClcPreshutdown(WPARAM wParam, LPARAM lParam) +static int ClcPreshutdown(WPARAM, LPARAM) { cfg::shutDown = TRUE; if (hSvc_GetContactStatusMsg) @@ -186,7 +186,7 @@ static int ClcPreshutdown(WPARAM wParam, LPARAM lParam) return 0; } -int ClcShutdown(WPARAM wParam, LPARAM lParam) +int ClcShutdown(WPARAM, LPARAM) { DeleteObject(cfg::dat.hPen3DBright); DeleteObject(cfg::dat.hPen3DDark); -- cgit v1.2.3