diff options
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 8 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 12 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistevents.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmenus.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmod.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/contact.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/extBackg.cpp | 2 |
8 files changed, 19 insertions, 19 deletions
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 07838053c1..6d80e49cfd 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -125,7 +125,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName"))
ReloadExtraInfo((HANDLE)wParam);
}
- else if (wParam != 0 && (szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0)) != NULL) {
+ else if (wParam != 0 && (szProto = GetContactProto((HANDLE)wParam)) != NULL) {
char *id = NULL;
if ( !__strcmp(cws->szModule, "Protocol") && !__strcmp(cws->szSetting, "p")) {
char *szProto_s;
@@ -352,7 +352,7 @@ LBL_Def: HANDLE hSelItem = NULL;
ClcContact *selcontact = NULL;
- char *szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ char *szProto = GetContactProto((HANDLE)wParam);
if (szProto == NULL)
status = ID_STATUS_OFFLINE;
else
@@ -412,7 +412,7 @@ LBL_Def: if (contact->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
contact->hSubContact = (HANDLE) CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) contact->hContact, 0);
- contact->metaProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) contact->hSubContact, 0);
+ contact->metaProto = GetContactProto(contact->hSubContact);
contact->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) contact->hSubContact, 0);
if (contact->extraCacheEntry >= 0 && contact->extraCacheEntry < cfg::nextCacheEntry) {
int subIndex = cfg::getCache(contact->hSubContact, contact->metaProto);
@@ -523,7 +523,7 @@ LBL_Def: if ( !FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- contact->proto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ contact->proto = GetContactProto((HANDLE)wParam);
CallService(MS_CLIST_INVALIDATEDISPLAYNAME, wParam, 0);
lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HANDLE)wParam, 0), safe_sizeof(contact->szText));
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 160bc97112..37135af5ce 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -127,7 +127,7 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HANDLE hContact) p->bIsMeta = FALSE;
if (p->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
p->hSubContact = (HANDLE) CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
- p->metaProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) p->hSubContact, 0);
+ p->metaProto = GetContactProto(p->hSubContact);
p->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) p->hSubContact, 0);
}
else {
@@ -206,7 +206,7 @@ void RebuildEntireList(HWND hwnd, struct ClcData *dat) if (group != NULL) {
group->totalMembers++;
if ( !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
- char *szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto == NULL) {
if ( !pcli->pfnIsHiddenMode(dat, ID_STATUS_OFFLINE))
AddContactToGroup(dat, group, hContact);
@@ -271,7 +271,7 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto) cEntry->bStatusMsgValid = STATUSMSG_CLIST;
else {
if ( !szProto)
- szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto) {
if ( !result )
DBFreeVariant( &dbv );
@@ -374,7 +374,7 @@ void ReloadExtraInfo(HANDLE hContact) if (hContact && pcli->hwndContactTree) {
int index = cfg::getCache(hContact, NULL);
if (index >= 0 && index < cfg::nextCacheEntry) {
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
TZ_LoadTimeZone(hContact, &cfg::eCache[index], szProto);
InvalidateRect(pcli->hwndContactTree, NULL, FALSE);
@@ -501,7 +501,7 @@ void LoadSkinItemToCache(struct TExtraCache *cEntry, const char *szProto) void ReloadSkinItemsToCache()
{
for (int i = 0; i < cfg::nextCacheEntry; i++) {
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)cfg::eCache[i].hContact, 0);
+ char *szProto = GetContactProto(cfg::eCache[i].hContact);
if (szProto)
LoadSkinItemToCache(&cfg::eCache[i], szProto);
}
@@ -531,7 +531,7 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc return dbHidden;
if (szProto == NULL)
- szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if (cfg::dat.bFilterEffective & CLVM_STICKY_CONTACTS) {
if ((dwLocalMask = cfg::getDword(hContact, "CLVM", cfg::dat.current_viewmode, 0)) != 0) {
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index 277eb29db1..12449d3adb 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -276,7 +276,7 @@ struct CListEvent* AddEvent(CLISTEVENT *cle) return p;
} } }
- szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) p->cle.hContact, 0);
+ szProto = GetContactProto(p->cle.hContact);
szName = pcli->pfnGetContactDisplayName(p->cle.hContact, 0);
if (szProto && szName) {
nmi = (struct NotifyMenuItemExData *) malloc(sizeof(struct NotifyMenuItemExData));
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 801fc644ba..fdd5c3e9f2 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -124,7 +124,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA SetWindowText(hWnd, szTitle);
SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
- pCaps = CallProtoService(contact ? contact->proto : (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0), PS_GETCAPS, PFLAGNUM_1, 0);
+ pCaps = CallProtoService(contact ? contact->proto : GetContactProto(hContact), PS_GETCAPS, PFLAGNUM_1, 0);
Utils::enableDlgControl(hWnd, IDC_IGN_ALWAYSONLINE, pCaps & PF1_INVISLIST ? TRUE : FALSE);
Utils::enableDlgControl(hWnd, IDC_IGN_ALWAYSOFFLINE, pCaps & PF1_VISLIST ? TRUE : FALSE);
CheckDlgButton(hWnd, IDC_IGN_PRIORITY, cfg::getByte(hContact, "CList", "Priority", 0) ? 1 : 0);
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index 9065d52d9e..c6f619f010 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -64,7 +64,7 @@ int IconFromStatusMode(const char *szProto, int status, HANDLE hContact, HICON * if (szProto != NULL && !strcmp(szProto, cfg::dat.szMetaName) && cfg::dat.bMetaAvail && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
HANDLE hSubContact = (HANDLE) CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
- szFinalProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hSubContact, 0);
+ szFinalProto = GetContactProto(hSubContact);
finalStatus = (status == 0) ? (WORD) cfg::getWord(hSubContact, szFinalProto, "Status", ID_STATUS_OFFLINE) : status;
} else {
szFinalProto = (char*) szProto;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c283da5058..5f2059e0ea 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -476,7 +476,7 @@ void SetDBButtonStates(HANDLE hPassedContact) continue;
}
if (buttonItem->dwFlags & BUTTON_ISCONTACTDBACTION)
- szModule = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szModule = GetContactProto(hContact);
hFinalContact = hContact;
} else
hFinalContact = 0;
@@ -1444,7 +1444,7 @@ skipbg: if (contactOK) {
char szFinalService[512];
- mir_snprintf(szFinalService, 512, "%s/%s", (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0), item->szService);
+ mir_snprintf(szFinalService, 512, "%s/%s", GetContactProto(hContact), item->szService);
if (ServiceExists(szFinalService))
CallService(szFinalService, wwParam, llParam);
else
@@ -1460,7 +1460,7 @@ skipbg: if (item->dwFlags & BUTTON_ISCONTACTDBACTION || item->dwFlags & BUTTON_DBACTIONONCONTACT) {
contactOK = ServiceParamsOK(item, &wwParam, &llParam, hContact);
if (contactOK && item->dwFlags & BUTTON_ISCONTACTDBACTION)
- szModule = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szModule = GetContactProto(hContact);
finalhContact = hContact;
}
else contactOK = 1;
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 2d54120e8b..0bce13f2ae 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -51,7 +51,7 @@ static int GetContactStatus(HANDLE hContact) {
char *szProto;
- szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto == NULL)
return ID_STATUS_OFFLINE;
return cfg::getWord(hContact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -161,7 +161,7 @@ void LoadContactTree(void) while (hContact != NULL) {
status = GetContactStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL))
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode((char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0), status, hContact, NULL), 1);
+ pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL), 1);
if (mc_disablehgh && !mc_hgh_removed) {
if ( !DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 29854db114..651995a52c 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -1327,7 +1327,7 @@ void LoadPerContactSkins(TCHAR *tszFileName) char UIN[40];
int j;
- szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto) {
uid = (char *)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR) uid != CALLSERVICE_NOTFOUND && uid != NULL) {
|