From a1d6cb7bdc354be0968c6ba5ac4615e14a90eead Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 May 2016 17:21:08 +0000 Subject: these tons of code aren't needed anymore... git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/QuickSearch/i_ok.inc | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'plugins/QuickSearch/i_ok.inc') diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc index 009dcd6ba5..c710f76880 100644 --- a/plugins/QuickSearch/i_ok.inc +++ b/plugins/QuickSearch/i_ok.inc @@ -257,8 +257,8 @@ end; procedure LoadOneItem(hContact:THANDLE;column:pcolumnitem;proto:integer; var res:tQSRec); var lmodule:PAnsiChar; + pInfo:PWideChar; DbEvent:TMEVENT; - cni:TCONTACTINFO; dbei:TDBEVENTINFO; data:tSubstData; begin @@ -299,36 +299,14 @@ begin end; QST_CONTACTINFO: begin - FillChar(cni,SizeOf(cni),0); - cni.cbSize :=sizeof(cni); - cni.dwFlag :=cnftype or CNF_UNICODE; - cni.hContact:=hContact; - cni.szProto :=GetProtoName(proto); - if CallService(MS_CONTACT_GETCONTACTINFO,0,tlparam(@cni))=0 then + pInfo := Contact_GetInfo(cnftype,hContact,nil); + if pInfo <> nil then begin - case cni._type of - CNFT_ASCIIZ: begin - if cni.retval.szVal.w<>nil then - begin - StrDupW(res.text,cni.retval.szVal.w); - mir_free(cni.retval.szVal.w); - end; - exit; - end; - CNFT_BYTE :begin - res.data:=cni.retval.bVal; - if cnftype=CNF_GENDER then - begin - if not (res.data in [70,77]) then - res.data:=DBReadByte(hContact,'UserInfo','Gender',0); - exit; - end - end; - CNFT_WORD :res.data:=cni.retval.wVal; - CNFT_DWORD:res.data:=cni.retval.dVal; - end; - res.text:=int2strw(res.data); + StrDupW(res.text,pInfo); + mir_free(pInfo); + exit; end; + res.text:=int2strw(res.data); end; QST_SETTING: begin -- cgit v1.2.3