From 794fa3fb5cc63ac9b69908bd04f4be985a4a8cd1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 10 Aug 2013 13:28:49 +0000 Subject: - unused services MS_FP_SAMECLIENTS & MS_FP_GETCLIENTICON removed; - Finger_IsSameClents & Finger_GetClientIcon helpers added; - unused code removed from FingerPrint or replaced with the calls from mir_core.dll git-svn-id: http://svn.miranda-ng.org/main/trunk@5632 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/QuickSearch/sr_global.pas | 8 ++++---- plugins/QuickSearch/sr_optdialog.pas | 2 +- plugins/QuickSearch/sr_window.pas | 16 +++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) (limited to 'plugins/QuickSearch') diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas index cd9e1d826e..46d53df0f9 100644 --- a/plugins/QuickSearch/sr_global.pas +++ b/plugins/QuickSearch/sr_global.pas @@ -48,7 +48,7 @@ const ptString = 2; ptUnicode = 3; ptCurrent = 4; - + const //types ST_BYTE = 0; ST_WORD = 1; @@ -169,7 +169,7 @@ const so_skipminimized :PAnsiChar = 'skipminimized'; so_showoffline :PAnsiChar = 'showoffline'; so_colorize :PAnsiChar = 'colorize'; - + so__title :PAnsiChar = '_title'; so__setting_type :PAnsiChar = '_setting_type'; so__setting_cnftype:PAnsiChar = '_setting_cnftype'; @@ -220,7 +220,7 @@ var ttbopt:TTBButton; begin removetoolbar; - + if qsopt.showintoptoolbar then begin if ServiceExists(MS_TTB_ADDBUTTON)>0 then @@ -681,7 +681,7 @@ begin qsopt.savepattern :=GetBool(so_savepattern ,true); qsopt.colorize :=GetBool(so_colorize ,true); - if ServiceExists(MS_FP_GETCLIENTICON)<>0 then + if ServiceExists(MS_FP_GETCLIENTICONW)<>0 then qsopt.showclienticons:=GetBool(so_showclienticons,true) else qsopt.showclienticons:=false; diff --git a/plugins/QuickSearch/sr_optdialog.pas b/plugins/QuickSearch/sr_optdialog.pas index 7e7e711532..0bdb9e444c 100644 --- a/plugins/QuickSearch/sr_optdialog.pas +++ b/plugins/QuickSearch/sr_optdialog.pas @@ -713,7 +713,7 @@ begin CheckDlgButton(Dialog,IDC_CH_EXPORTHEADERS ,ORD(qsopt.exportheaders)); CheckDlgButton(Dialog,IDC_CH_SKIPMINIMIZED ,ORD(qsopt.skipminimized)); CheckDlgButton(Dialog,IDC_CH_SAVEPATTERN ,ORD(qsopt.savepattern)); - if ServiceExists(MS_FP_GETCLIENTICON)<>0 then + if ServiceExists(MS_FP_GETCLIENTICONW)<>0 then CheckDlgButton(Dialog,IDC_CH_SHOWCLIENTICONS,ORD(qsopt.showclienticons)) else EnableWindow(GetDlgItem(Dialog,IDC_CH_SHOWCLIENTICONS),false); diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas index de9ba1b634..0b13cbeede 100644 --- a/plugins/QuickSearch/sr_window.pas +++ b/plugins/QuickSearch/sr_window.pas @@ -500,7 +500,7 @@ var cni:TCONTACTINFO; dbei:TDBEVENTINFO; hDbEvent:cardinal; - tmp:uint_ptr; + tmp:int_ptr; protov:PAnsiChar; begin FillChar(res,SizeOf(tQSRec),0); @@ -526,7 +526,7 @@ begin ST_SERVICE: begin if wparam._type=ptCurrent then wparam.n:=hContact; if lparam._type=ptCurrent then lparam.n:=hContact; - tmp:=uint_ptr(CallService(protov,wparam.n,lparam.n)); + tmp:=int_ptr(CallService(protov,wparam.n,lparam.n)); if tmp=CALLSERVICE_NOTFOUND then exit; case setting_cnftype of ptString: begin @@ -1884,6 +1884,7 @@ var rc:TRECT; h:HICON; buf:array [0..255] of AnsiChar; + MirVerW:PWideChar; i,j,sub:integer; begin lplvcd:=pointer(lParam); @@ -1946,13 +1947,10 @@ begin if (qsopt.columns[sub].flags and COL_CLIENT)<>0 then begin i:=LV_GetLParam(grid,lplvcd^.nmcd.dwItemSpec); - FastWideToAnsiBuf(MainBuf[i,sub].text,buf); - -// ListView_GetItemTextA(grid,lplvcd^.nmcd.dwItemSpec,lplvcd^.iSubItem,buf,SizeOf(buf)); -//!! - if (buf[0]<>#0) and (ServiceExists(MS_FP_GETCLIENTICON)<>0) then + MirVerW:=MainBuf[i,sub].text; + if (MirVerW[0]<>#0) and (ServiceExists(MS_FP_GETCLIENTICONW)<>0) then begin - h:=CallService(MS_FP_GETCLIENTICON,tlparam(@buf),0); + h:=CallService(MS_FP_GETCLIENTICONW,tlparam(MirVerW),0); ListView_GetSubItemRect(grid,lplvcd^.nmcd.dwItemSpec,lplvcd^.iSubItem,LVIR_ICON,@rc); DrawIconEx(lplvcd^.nmcd.hdc,rc.left+1,rc.top,h,16,16,0,0,DI_NORMAL); DestroyIcon(h); @@ -2184,7 +2182,7 @@ begin else if (wparam.a<>NIL) and // FingerPrint preprocess (setting_type=ST_STRING) and (lstrcmpia(wparam.a,'MirVer')=0) and - (ServiceExists(MS_FP_GETCLIENTICON)<>0) then + (ServiceExists(MS_FP_GETCLIENTICONW)<>0) then flags:=flags or COL_CLIENT; end; end; -- cgit v1.2.3