From e3917c5232297633df816d23abea42e3c27c1b69 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Feb 2017 18:35:23 +0300 Subject: minor code cleaning --- plugins/AddContactPlus/src/addcontact.cpp | 4 +++- plugins/mRadio/i_service.inc | 22 ++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'plugins') diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index dbef10c21f..e1d0a79bd0 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -127,7 +127,9 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) cbei.pszText = pAccounts[i]->tszAccountName; GetTextExtentPoint32(hdc, cbei.pszText, (int)mir_wstrlen(cbei.pszText), &textSize); - if (textSize.cx > cbWidth) cbWidth = textSize.cx; + if (textSize.cx > cbWidth) + cbWidth = textSize.cx; + HICON hIcon = (HICON)CallProtoService(pAccounts[i]->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0); cbei.iImage = cbei.iSelectedImage = ImageList_AddIcon(hIml, hIcon); DestroyIcon(hIcon); diff --git a/plugins/mRadio/i_service.inc b/plugins/mRadio/i_service.inc index 740b9378ff..9b953c40e7 100644 --- a/plugins/mRadio/i_service.inc +++ b/plugins/mRadio/i_service.inc @@ -115,8 +115,6 @@ function Service_LoadIcon(wParam:WPARAM;lParam:LPARAM):int_ptr;cdecl; begin case loword(wParam) of PLI_PROTOCOL: result:=LoadImage(hInstance,MAKEINTRESOURCE(IDI_MAIN),IMAGE_ICON,16,16,LR_SHARED); -// PLI_ONLINE : result:=0; -// PLI_OFFLINE : result:=0; else result:=0; end; @@ -183,14 +181,14 @@ end; procedure CreateProtoServices; begin - prh0:=CreateProtoService(PS_GETCAPS ,@Service_GetCaps); - prh1:=CreateProtoService(PS_ADDTOLIST ,@Service_AddToList); - prh2:=CreateProtoService(PS_CREATEADVSEARCHUI,@Service_ExtSearchUI); - prh3:=CreateProtoService(PS_SEARCHBYADVANCED ,@Service_SearchByAdvanced); - prh4:=CreateProtoService(PS_BASICSEARCH ,@Service_SearchBasic); - prh5:=CreateProtoService(PS_GETNAME ,@Service_GetName); - prh6:=CreateProtoService(PS_LOADICON ,@Service_LoadIcon); - prh7:=CreateProtoService(PS_GETSTATUS ,@Service_GetStatus); - prh8:=CreateProtoService(PS_SETSTATUS ,@Service_SetStatus); - prh9:=CreateProtoService(PSS_GETAWAYMSG ,@Service_GetAwayMsg); + prh0:=CreateProtoService(PS_GETCAPS, @Service_GetCaps); + prh1:=CreateProtoService(PS_ADDTOLIST, @Service_AddToList); + prh2:=CreateProtoService(PS_CREATEADVSEARCHUI, @Service_ExtSearchUI); + prh3:=CreateProtoService(PS_SEARCHBYADVANCED, @Service_SearchByAdvanced); + prh4:=CreateProtoService(PS_BASICSEARCH, @Service_SearchBasic); + prh5:=CreateProtoService(PS_GETNAME, @Service_GetName); + prh6:=CreateProtoService(PS_LOADICON, @Service_LoadIcon); + prh7:=CreateProtoService(PS_GETSTATUS, @Service_GetStatus); + prh8:=CreateProtoService(PS_SETSTATUS, @Service_SetStatus); + prh9:=CreateProtoService(PSS_GETAWAYMSG, @Service_GetAwayMsg); end; -- cgit v1.2.3