From b660fac5560005706aeab0a0d5ad2b32bdcaf929 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 1 Jun 2015 17:20:04 +0000 Subject: - ProtoCallService() function considered too dangerous and therefore isn't exported anymore, it's closed in the core, CallProtoService() is used instead everywhere; - fixes for some quirks with PS_* calls. git-svn-id: http://svn.miranda-ng.org/main/trunk@13959 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clistmod.cpp | 4 ++-- plugins/Clist_modern/src/modern_clisttray.cpp | 12 ++++++------ plugins/Clist_modern/src/modern_statusbar.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index d033a41625..7015a99388 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -61,7 +61,7 @@ HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int statu // check status is online if (status > ID_STATUS_OFFLINE) { // get xicon - HICON hXIcon = (HICON)ProtoCallService(szProto, PS_GETCUSTOMSTATUSICON, 0, 0); + HICON hXIcon = (HICON)CallProtoService(szProto, PS_GETCUSTOMSTATUSICON, 0, 0); if (hXIcon) { // check overlay mode if (trayOption & 2) { @@ -102,7 +102,7 @@ int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact) int result = -1; if (ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON)) - result = ProtoCallService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); + result = CallProtoService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0); if (result == -1 || !(LOWORD(result))) { //Get normal Icon diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index e89b6f8aab..cd3f19d1c6 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -603,21 +603,21 @@ int cliTrayCalcChanged(const char *szChangedProto, int, int) if (szProto == NULL) break; - iStatus = ProtoCallService(szProto, PS_GETSTATUS, 0, 0); + iStatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0); if (g_StatusBarData.bConnectingIcon && IsStatusConnecting(iStatus)) hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szProto, 0); else - hIcon = pcli->pfnGetIconFromStatusMode(NULL, szProto, ProtoCallService(szProto, PS_GETSTATUS, 0, 0)); + hIcon = pcli->pfnGetIconFromStatusMode(NULL, szProto, CallProtoService(szProto, PS_GETSTATUS, 0, 0)); pcli->pfnTrayIconMakeTooltip(NULL, szProto); break; case TRAY_ICON_MODE_CYCLE: - iStatus = ProtoCallService(szChangedProto, PS_GETSTATUS, 0, 0); + iStatus = CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0); if (g_StatusBarData.bConnectingIcon && IsStatusConnecting(iStatus)) hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto, 0); else if (!bConn) - hIcon = pcli->pfnGetIconFromStatusMode(NULL, szChangedProto, ProtoCallService(szChangedProto, PS_GETSTATUS, 0, 0)); + hIcon = pcli->pfnGetIconFromStatusMode(NULL, szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0)); pcli->pfnTrayIconMakeTooltip(NULL, NULL); break; @@ -627,11 +627,11 @@ int cliTrayCalcChanged(const char *szChangedProto, int, int) if (!mir_strcmp(pcli->trayIcon[i].szProto, szChangedProto)) break; - iStatus = ProtoCallService(szChangedProto, PS_GETSTATUS, 0, 0); + iStatus = CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0); if (g_StatusBarData.bConnectingIcon && IsStatusConnecting(iStatus)) hIcon = (HICON)CLUI_GetConnectingIconService((WPARAM)szChangedProto, 0); else - hIcon = pcli->pfnGetIconFromStatusMode(NULL, szChangedProto, ProtoCallService(szChangedProto, PS_GETSTATUS, 0, 0)); + hIcon = pcli->pfnGetIconFromStatusMode(NULL, szChangedProto, CallProtoService(szChangedProto, PS_GETSTATUS, 0, 0)); pcli->pfnTrayIconMakeTooltip(NULL, pcli->trayIcon[i].szProto); break; } diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 4e6ea38bc4..e5ba279caf 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -244,7 +244,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if (p->iProtoStatus > ID_STATUS_OFFLINE) if (p->bShowProtoEmails == 1 && ProtoServiceExists(szProto, PS_GETUNREADEMAILCOUNT)) { - int nEmails = (int)ProtoCallService(szProto, PS_GETUNREADEMAILCOUNT, 0, 0); + int nEmails = (int)CallProtoService(szProto, PS_GETUNREADEMAILCOUNT, 0, 0); if (nEmails > 0) { TCHAR buf[40]; mir_sntprintf(buf, SIZEOF(buf), _T("[%d]"), nEmails); @@ -360,7 +360,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ((p.xStatusMode & 3)) { if (p.iProtoStatus > ID_STATUS_OFFLINE) { if (ProtoServiceExists(p.szAccountName, PS_GETCUSTOMSTATUSICON)) - p.extraIcon = (HICON)ProtoCallService(p.szAccountName, PS_GETCUSTOMSTATUSICON, 0, 0); + p.extraIcon = (HICON)CallProtoService(p.szAccountName, PS_GETCUSTOMSTATUSICON, 0, 0); if (p.extraIcon && (p.xStatusMode & 3) == 3) w += iconWidth + 1; } -- cgit v1.2.3