summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas
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/Utils.pas
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/Utils.pas')
-rw-r--r--plugins/Utils.pas/mircontacts.pas16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas
index dc43b8d84e..43abcda5ba 100644
--- a/plugins/Utils.pas/mircontacts.pas
+++ b/plugins/Utils.pas/mircontacts.pas
@@ -85,8 +85,7 @@ end;
function GetContactDisplayName(hContact: TMCONTACT; Proto: PAnsiChar = nil; Contact: boolean = false): PWideChar;
var
- ci: TContactInfo;
- pUnk:PWideChar;
+ pName, pUnk:PWideChar;
begin
if (hContact = 0) and Contact then
StrDupW(Result, TranslateW('Server'))
@@ -99,17 +98,14 @@ begin
StrDupW(Result, pUnk)
else
begin
- ci.cbSize := SizeOf(ci);
- ci.hContact := hContact;
- ci.szProto := Proto;
- ci.dwFlag := CNF_DISPLAY + CNF_UNICODE;
- if CallService(MS_CONTACT_GETCONTACTINFO, 0, LPARAM(@ci)) = 0 then
+ pName := Contact_GetInfo(CNF_DISPLAY, hContact, Proto);
+ if pName <> nil then
begin
- if StrCmpW(ci.retval.szVal.w, pUnk)=0 then
+ if StrCmpW(pName, pUnk)=0 then
AnsiToWide(GetContactID(hContact, Proto), Result, CP_ACP)
else
- StrDupW(Result, ci.retval.szVal.w);
- mir_free(ci.retval.szVal.w);
+ StrDupW(Result, pName);
+ mir_free(pName);
end
else
AnsiToWide(GetContactID(hContact, Proto), Result);