summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Alarms/src/alarmlist.cpp5
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp2
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp2
-rw-r--r--plugins/Clist_mw/src/clcitems.cpp2
-rw-r--r--plugins/Clist_mw/src/clistmod.cpp2
-rw-r--r--plugins/Clist_mw/src/clistopts.cpp2
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp4
-rwxr-xr-xplugins/MetaContacts/src/meta_services.cpp17
-rw-r--r--plugins/ModernOpt/src/mopt_selector.cpp6
-rw-r--r--plugins/New_GPG/src/main.cpp4
-rwxr-xr-xplugins/New_GPG/src/messages.cpp6
-rw-r--r--plugins/New_GPG/src/utilities.cpp4
-rw-r--r--plugins/Ping/src/pingthread.cpp4
-rw-r--r--plugins/SMS/src/send.cpp4
-rw-r--r--plugins/Scriver/src/chat/window.cpp14
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp85
19 files changed, 82 insertions, 87 deletions
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp
index 0076292e50..73fa940a61 100644
--- a/plugins/Alarms/src/alarmlist.cpp
+++ b/plugins/Alarms/src/alarmlist.cpp
@@ -452,8 +452,7 @@ static LRESULT CALLBACK PopupAlarmDlgProc(HWND hWnd, UINT message, WPARAM wParam
switch(message) {
case WM_COMMAND: // snooze
if (HIWORD(wParam) == STN_CLICKED) { //It was a click on the Popup.
- ALARM *mpd = NULL;
- mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
+ ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0);
if (mpd->flags & ALF_NOSNOOZE)
return TRUE;
@@ -490,7 +489,7 @@ static LRESULT CALLBACK PopupAlarmDlgProc(HWND hWnd, UINT message, WPARAM wParam
return TRUE;
case UM_FREEPLUGINDATA:
- ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd,(LPARAM)mpd);
+ ALARM *mpd = (ALARM *)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0);
if (mpd > 0) {
free_alarm_data(mpd);
delete mpd;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 622a20cda9..d155536a5e 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -266,7 +266,7 @@ static int ChangeAllProtoStatuses(unsigned statusMode, TCHAR *msg)
if (g_wMask & OPT_SETONLINEBACK){ // need to save old statuses & status messages
oldStatus[i] = status;
if (ProtoServiceExists(proto[i]->szModuleName, PS_GETMYAWAYMSG))
- oldStatusMsg[i] = (TCHAR*)CallProtoService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_TCHAR);
+ oldStatusMsg[i] = (TCHAR*)ProtoCallService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_TCHAR);
else
oldStatusMsg[i] = GetDefStatusMsg(status, proto[i]->szModuleName);
}
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 0ce1c3f5cd..dd417c6160 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -207,7 +207,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName)
else return;
ics.status = &statusToSet;
- CallProtoService(szAccName, PS_SETCUSTOMSTATUSEX, 0, (LPARAM)&ics);
+ ProtoCallService(szAccName, PS_SETCUSTOMSTATUSEX, 0, (LPARAM)&ics);
}
INT_PTR showList(WPARAM wparam, LPARAM lparam, LPARAM param)
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index 87fa738081..291ed4ac4c 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -110,7 +110,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact)
int result = -1;
if ( ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON))
- result = CallProtoService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0);
+ result = ProtoCallService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0);
if (result == -1 || !(LOWORD(result))) {
//Get normal Icon
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index b18c3c5008..7f4033bfe7 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -382,7 +382,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
if ((p.xStatusMode & 3)) {
if (p.ProtoStatus > ID_STATUS_OFFLINE) {
if ( ProtoServiceExists(p.AccountName, PS_GETCUSTOMSTATUSICON))
- p.extraIcon = (HICON)CallProtoService(p.AccountName, PS_GETCUSTOMSTATUSICON, 0, 0);
+ p.extraIcon = (HICON)ProtoCallService(p.AccountName, PS_GETCUSTOMSTATUSICON, 0, 0);
if (p.extraIcon && (p.xStatusMode & 3) == 3)
w += GetSystemMetrics(SM_CXSMICON)+1;
}
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp
index 19c9c139aa..35e76d189d 100644
--- a/plugins/Clist_mw/src/clcitems.cpp
+++ b/plugins/Clist_mw/src/clcitems.cpp
@@ -135,7 +135,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group
group->cl.items[i]->subcontacts = NULL;
if ( ProtoServiceExists(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON))
- img = CallProtoService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0);
+ img = ProtoCallService(cacheEntry->szProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hContact, 0);
if (img == -1 || !(LOWORD(img)))
img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0);
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp
index 1b3181d095..a859352a18 100644
--- a/plugins/Clist_mw/src/clistmod.cpp
+++ b/plugins/Clist_mw/src/clistmod.cpp
@@ -62,7 +62,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact)
}
if ( ProtoServiceExists(szActProto, PS_GETADVANCEDSTATUSICON))
- result = CallProtoService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0);
+ result = ProtoCallService(szActProto, PS_GETADVANCEDSTATUSICON, (WPARAM)hActContact, 0);
if (result == -1 || !(LOWORD(result)))
// result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot)
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp
index 2fe399d467..2f77d6b109 100644
--- a/plugins/Clist_mw/src/clistopts.cpp
+++ b/plugins/Clist_mw/src/clistopts.cpp
@@ -140,7 +140,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)TranslateT("Global"));
SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,0);
for ( i = 0; i < count; i++ ) {
- if ( !IsAccountEnabled( accs[i] ) || CallProtoService( accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0 ) == 0 )
+ if ( !IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) == 0)
continue;
item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)accs[i]->tszAccountName);
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 6bc3a2a65f..0952f744e7 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -274,7 +274,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto)
CUSTOM_STATUS cst = { sizeof(cst) };
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
- if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !CallProtoService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) {
+ if (ProtoServiceExists(szProto, PS_GETCUSTOMSTATUSEX) && !ProtoCallService(szProto, PS_GETCUSTOMSTATUSEX, (WPARAM)hContact, (LPARAM)&cst) && xStatus > 0) {
cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
cst.wParam = &xStatus2;
cst.ptszName = xStatusName;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 2b346b8ccc..b76cd24a80 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -1386,7 +1386,7 @@ skipbg:
if (contactOK) {
char *szProto = GetContactProto(hContact);
if (ProtoServiceExists(szProto, item->szService))
- CallProtoService(szProto, item->szService, wwParam, llParam);
+ ProtoCallService(szProto, item->szService, wwParam, llParam);
else
serviceFailure = TRUE;
}
@@ -1710,7 +1710,7 @@ buttons_done:
CUSTOM_STATUS cst = { sizeof(cst) };
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
- if (ProtoServiceExists(pd->RealName, PS_GETCUSTOMSTATUSEX) && !CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cst) && xStatus > 0)
+ if (ProtoServiceExists(pd->RealName, PS_GETCUSTOMSTATUSEX) && !ProtoCallService(pd->RealName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cst) && xStatus > 0)
hIcon = (HICON)CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSICON, 0, LR_SHARED); // get OWN xStatus icon (if set)
else
hIcon = LoadSkinnedProtoIcon(szProto, status);
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp
index bcbb6dcd19..6bd121f736 100755
--- a/plugins/MetaContacts/src/meta_services.cpp
+++ b/plugins/MetaContacts/src/meta_services.cpp
@@ -413,7 +413,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam)
DWORD flags = pre->flags;
ccs->hContact = hMeta;
pre->flags |= (db_get_b(hMeta, META_PROTO, "WindowOpen", 0) ? 0 : PREF_CREATEREAD);
- if (ProtoServiceExists(proto, PSR_MESSAGE) && !CallProtoService(proto, PSR_MESSAGE, 0, (LPARAM)ccs))
+ if (ProtoServiceExists(proto, PSR_MESSAGE) && !ProtoCallService(proto, PSR_MESSAGE, 0, (LPARAM)ccs))
added = TRUE;
ccs->hContact = hSub;
pre->flags = flags;
@@ -465,18 +465,16 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
CCSDATA *ccs = (CCSDATA*)lParam;
PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
- char *proto = GetContactProto(ccs->hContact);
-
// contact is not a meta proto contact - just leave it
+ char *proto = GetContactProto(ccs->hContact);
if ( !proto || strcmp(proto, META_PROTO))
return 0;
if (options.use_proto_recv) {
// use the subcontact's protocol to add the db if possible (AIMOSCAR removes HTML here!)
HANDLE most_online = Meta_GetMostOnline(ccs->hContact);
- char *proto = GetContactProto(most_online);
- if (proto)
- if (CallProtoService(proto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND)
+ if (char *subProto = GetContactProto(most_online))
+ if ( ProtoCallService(subProto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND)
return 0;
}
@@ -839,7 +837,7 @@ INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam)
char *proto = GetContactProto(most_online);
if (proto)
if ( ProtoServiceExists(proto, PSS_USERISTYPING))
- CallProtoService(proto, PSS_USERISTYPING, (WPARAM)most_online, (LPARAM)lParam);
+ ProtoCallService(proto, PSS_USERISTYPING, (WPARAM)most_online, (LPARAM)lParam);
return 0;
}
@@ -1249,9 +1247,10 @@ INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) {
AI->hContact = hSub;
- int result = CallProtoService(proto, PS_GETAVATARINFOT, wParam, lParam);
+ INT_PTR result = ProtoCallService(proto, PS_GETAVATARINFOT, wParam, lParam);
AI->hContact = hMeta;
- if (result != CALLSERVICE_NOTFOUND) return result;
+ if (result != CALLSERVICE_NOTFOUND)
+ return result;
}
return GAIR_NOAVATAR; // fail
}
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp
index 73316f82a0..515e23f8f6 100644
--- a/plugins/ModernOpt/src/mopt_selector.cpp
+++ b/plugins/ModernOpt/src/mopt_selector.cpp
@@ -27,13 +27,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static void sttApplySkin(MODERNOPTOBJECT *obj, TCHAR *fn)
{
- CallProtoService(obj->lpzThemeModuleName, TS_SKIN_APPLY, NULL, (LPARAM)fn);
+ ProtoCallService(obj->lpzThemeModuleName, TS_SKIN_APPLY, NULL, (LPARAM)fn);
}
static TCHAR *sttGetActiveSkin(MODERNOPTOBJECT *obj)
{
return ProtoServiceExists(obj->lpzThemeModuleName, TS_SKIN_ACTIVE) ?
- (TCHAR*)CallProtoService(obj->lpzThemeModuleName, TS_SKIN_ACTIVE, 0, 0) : 0;
+ (TCHAR*)ProtoCallService(obj->lpzThemeModuleName, TS_SKIN_ACTIVE, 0, 0) : 0;
}
static void sttPreviewSkin(MODERNOPTOBJECT *obj, TCHAR *fn, LPDRAWITEMSTRUCT lps)
@@ -41,7 +41,7 @@ static void sttPreviewSkin(MODERNOPTOBJECT *obj, TCHAR *fn, LPDRAWITEMSTRUCT lps
if (!fn) return;
if ( ProtoServiceExists(obj->lpzThemeModuleName, TS_SKIN_PREVIEW)) {
- CallProtoService(obj->lpzThemeModuleName, TS_SKIN_PREVIEW, (WPARAM)lps, (LPARAM)fn);
+ ProtoCallService(obj->lpzThemeModuleName, TS_SKIN_PREVIEW, (WPARAM)lps, (LPARAM)fn);
return;
}
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 9ea00ce899..41d568f8fa 100644
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -2287,7 +2287,7 @@ void InitCheck()
for(int i = 0; i < count; i++)
if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY))
- CallProtoService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap);
+ ProtoCallService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap);
}
if(bFileTransfers)
{
@@ -2302,7 +2302,7 @@ void InitCheck()
for(int i = 0; i < count; i++)
if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY))
- CallProtoService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap);
+ ProtoCallService(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY, 0, (LPARAM)&cap);
}
}
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index a7239171b0..5c702b7484 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -561,7 +561,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
ICQ_CUSTOMCAP cap = {0};
strcpy(cap.caps, "GPG AutoExchange");
- if(CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) {
+ if(ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) {
CallContactService(ccs->hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)"-----PGP KEY REQUEST-----");
return 0;
}
@@ -880,12 +880,12 @@ int HookSendMsg(WPARAM w, LPARAM l)
debuglog<<std::string(time_str()+": info(autoexchange): protocol looks like icq, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
char *proto = GetContactProto(hContact);
- if(ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
+ if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
if(bDebugLog)
debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
ICQ_CUSTOMCAP cap = {0};
strcpy(cap.caps, "GPG AutoExchange");
- if(CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)hContact, (LPARAM)&cap)) {
+ if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)hContact, (LPARAM)&cap)) {
if(bDebugLog)
debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)));
CallContactService(hContact, PSS_MESSAGE, (dbei->flags & DBEF_UTF) ? PREF_UTF : 0, (LPARAM)"-----PGP KEY REQUEST-----");
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index ef34f756bc..a7aee1a7cf 100644
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -546,11 +546,11 @@ INT_PTR onSendFile(WPARAM w, LPARAM l)
bool cap_found = false, supported_proto = false;
if(uin)
{
- if(ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
+ if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
supported_proto = true;
ICQ_CUSTOMCAP cap = {0};
strcpy(cap.caps, "GPG FileTransfer");
- if(CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap))
+ if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap))
cap_found = true;
}
}
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index 5e13f0b9b0..bf9372c0fa 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -72,13 +72,13 @@ void SetProtoStatus(char *pszLabel, char *pszProto, int if_status, int new_statu
}
} else {
if(ProtoServiceExists(pszProto, PS_GETSTATUS)) {
- if(CallProtoService(pszProto, PS_GETSTATUS, 0, 0) == if_status) {
+ if(ProtoCallService(pszProto, PS_GETSTATUS, 0, 0) == if_status) {
if(options.logging) {
char buf[1024];
mir_snprintf(buf, 1024, Translate("%s - setting status of protocol '%s' (%d)"), pszLabel, pszProto, new_status);
CallService(PLUG "/Log", (WPARAM)buf, 0);
}
- CallProtoService(pszProto, PS_SETSTATUS, new_status, 0);
+ ProtoCallService(pszProto, PS_SETSTATUS, new_status, 0);
}
}
}
diff --git a/plugins/SMS/src/send.cpp b/plugins/SMS/src/send.cpp
index ed40d645c6..f843707d15 100644
--- a/plugins/SMS/src/send.cpp
+++ b/plugins/SMS/src/send.cpp
@@ -66,9 +66,9 @@ void StartSmsSend(HWND hWndDlg,SIZE_T dwModuleIndex,LPWSTR lpwszPhone,SIZE_T dwP
SendSMSWindowDbeiSet(hWndDlg,pdbei);
char *szProto = ssSMSSettings.ppaSMSAccounts[dwModuleIndex]->szModuleName;
- if (ProtoServiceExists(szProto, MS_ICQ_SENDSMS)) {
+ if ( ProtoServiceExists(szProto, MS_ICQ_SENDSMS)) {
WideCharToMultiByte(CP_UTF8,0,lpwszMessageXMLEncoded,dwMessageXMLEncodedSize,lpszMessageUTF,dwMessageUTFBuffSize,NULL,NULL);
- hProcess = (HANDLE)CallProtoService(szProto, MS_ICQ_SENDSMS, (WPARAM)szPhone,(LPARAM)lpszMessageUTF);
+ hProcess = (HANDLE)ProtoCallService(szProto, MS_ICQ_SENDSMS, (WPARAM)szPhone,(LPARAM)lpszMessageUTF);
SendSMSWindowHProcessSet(hWndDlg,hProcess);
}
else MEMFREE(pdbei);
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 9baf53f490..25a9d74adb 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -815,14 +815,14 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS
// wParam = roomID parentdat->ptszID
// lParam = userID 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);
+ ti.lpszText = (TCHAR*)ProtoCallService(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"),
- TranslateT( "Nick name" ), ui1->pszNick,
- TranslateT( "Unique id" ), ui1->pszUID,
- TranslateT( "Status" ), TM_WordToString( parentdat->pStatuses, ui1->Status ));
- ti.lpszText = mir_tstrdup( ptszBuf );
+ TCHAR ptszBuf[1024];
+ mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ TranslateT("Nick name"), ui1->pszNick,
+ TranslateT("Unique id"), ui1->pszUID,
+ TranslateT("Status"), TM_WordToString( parentdat->pStatuses, ui1->Status));
+ ti.lpszText = mir_tstrdup(ptszBuf);
}
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 8700c05e3e..6f9beeffd2 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1411,12 +1411,10 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS
static int currentHovered = -1;
static HWND hwndToolTip = NULL;
static HWND oldParent = NULL;
- TOOLINFO ti = {0};
- RECT clientRect;
- BOOL bNewTip = FALSE;
- USERINFO *ui1 = NULL;
- if (hoveredItem == currentHovered) return;
+ if (hoveredItem == currentHovered)
+ return;
+
currentHovered = hoveredItem;
if (oldParent != hwnd && hwndToolTip) {
@@ -1424,50 +1422,49 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, POINT * pt, SESS
DestroyWindow(hwndToolTip);
hwndToolTip = NULL;
}
- if (hoveredItem == -1) {
+ if (hoveredItem == -1) {
SendMessage(hwndToolTip, TTM_ACTIVATE, 0, 0);
+ return;
+ }
- } else {
-
- if (!hwndToolTip) {
- hwndToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL,
- WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- hwnd, NULL, g_hInst, NULL);
- bNewTip = TRUE;
- }
-
- GetClientRect(hwnd, &clientRect);
- ti.cbSize = sizeof(TOOLINFO);
- ti.uFlags = TTF_SUBCLASS;
- ti.hinst = g_hInst;
- ti.hwnd = hwnd;
- ti.uId = 1;
- ti.rect = clientRect;
-
- ti.lpszText = NULL;
+ BOOL bNewTip = FALSE;
+ if (!hwndToolTip) {
+ hwndToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL,
+ WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ hwnd, NULL, g_hInst, NULL);
+ bNewTip = TRUE;
+ }
- ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered);
- if (ui1) {
- 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"),
- TranslateT("Nick name"), ui1->pszNick,
- TranslateT("Unique Id"), ui1->pszUID,
- TranslateT("Status"), TM_WordToString( parentdat->pStatuses, ui1->Status ));
- ti.lpszText = mir_tstrdup( ptszBuf );
- }
+ RECT clientRect;
+ GetClientRect(hwnd, &clientRect);
+
+ TOOLINFO ti = { sizeof(ti) };
+ ti.uFlags = TTF_SUBCLASS;
+ ti.hinst = g_hInst;
+ ti.hwnd = hwnd;
+ ti.uId = 1;
+ ti.rect = clientRect;
+
+ TCHAR ptszBuf[1024];
+
+ USERINFO *ui1 = SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, currentHovered);
+ if (ui1) {
+ if ( ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT))
+ ti.lpszText = (TCHAR*)ProtoCallService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID);
+ else {
+ mir_sntprintf(ptszBuf, SIZEOF(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ TranslateT("Nick name"), ui1->pszNick,
+ TranslateT("Unique Id"), ui1->pszUID,
+ TranslateT("Status"), TM_WordToString( parentdat->pStatuses, ui1->Status));
+ ti.lpszText = ptszBuf;
}
-
- SendMessage(hwndToolTip, bNewTip ? TTM_ADDTOOL : TTM_UPDATETIPTEXT, 0, (LPARAM)&ti);
- SendMessage(hwndToolTip, TTM_ACTIVATE, (ti.lpszText != NULL) , 0);
- SendMessage(hwndToolTip, TTM_SETMAXTIPWIDTH, 0 , 400);
- if (ti.lpszText)
- mir_free(ti.lpszText);
}
+
+ SendMessage(hwndToolTip, bNewTip ? TTM_ADDTOOL : TTM_UPDATETIPTEXT, 0, (LPARAM)&ti);
+ SendMessage(hwndToolTip, TTM_ACTIVATE, (ti.lpszText != NULL) , 0);
+ SendMessage(hwndToolTip, TTM_SETMAXTIPWIDTH, 0 , 400);
}
/*
@@ -1843,7 +1840,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
ti.cbSize = sizeof(ti);
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));
+ _tcsncpy(ptszBuf, (TCHAR*)ProtoCallService(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,