summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-18 14:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-18 14:12:13 +0000
commit81337e86426dd4a79836554342bdc2e7e6195769 (patch)
tree4854edef6130b994f3611eb1a035b5de8b37f5cc /plugins/TabSRMM/src/chat
parent4f14e4f86d5855d75c0941f9b8495e5a2e522087 (diff)
massive extinction of stupid service name's buffers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/chat')
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 7148f0cf84..95e0359ef7 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1450,10 +1450,8 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS
ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered);
if (ui1) {
- char serviceName[256];
- _snprintf(serviceName, SIZEOF(serviceName), "%s"MS_GC_PROTO_GETTOOLTIPTEXT, parentdat->pszModule);
- if (ServiceExists(serviceName))
- ti.lpszText = (TCHAR*)CallService(serviceName, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID);
+ if ( ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT))
+ ti.lpszText = (TCHAR*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID);
else {
TCHAR ptszBuf[ 1024 ];
mir_sntprintf( ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
@@ -1844,15 +1842,14 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered);
if (ui1) {
ti.cbSize = sizeof(ti);
- mir_snprintf(serviceName, SIZEOF(serviceName), "%s"MS_GC_PROTO_GETTOOLTIPTEXT, parentdat->pszModule);
- if (ServiceExists(serviceName))
- mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("%s"), (TCHAR*)CallService(serviceName, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID));
+ if (ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT))
+ _tcsncpy(ptszBuf, (TCHAR*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID), SIZEOF(ptszBuf));
else
mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("<b>%s:</b>\t%s\n<b>%s:</b>\t%s\n<b>%s:</b>\t%s"),
- TranslateT("Nick"), ui1->pszNick,
- TranslateT("Unique id"), ui1->pszUID,
- TranslateT("Status"), TM_WordToString(parentdat->pStatuses, ui1->Status));
+ TranslateT("Nick"), ui1->pszNick,
+ TranslateT("Unique id"), ui1->pszUID,
+ TranslateT("Status"), TM_WordToString(parentdat->pStatuses, ui1->Status));
if (ptszBuf != NULL)
if (CallService("mToolTip/ShowTipW", (WPARAM)mir_tstrdup(ptszBuf), (LPARAM)&ti))