summaryrefslogtreecommitdiff
path: root/plugins/QuickSearch/i_ok.inc
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
commita1d6cb7bdc354be0968c6ba5ac4615e14a90eead (patch)
treea1ed17002c33644b3362e6c1e6572f3fa7ef17d7 /plugins/QuickSearch/i_ok.inc
parentfef6b799309b5b9d7cbb2845fa27b777477e2a61 (diff)
these tons of code aren't needed anymore...
git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/QuickSearch/i_ok.inc')
-rw-r--r--plugins/QuickSearch/i_ok.inc36
1 files changed, 7 insertions, 29 deletions
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