diff options
author | Alexey Kulakov <panda75@bk.ru> | 2012-11-25 16:50:40 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2012-11-25 16:50:40 +0000 |
commit | 8c4ce0fe856be7361f26fd1d37610de94b77461a (patch) | |
tree | 399baf6da8cd157db4e833c30ce64eac81d6624d | |
parent | 1914d6f60f4ad92c0efa45a6559a51421bfcaf1e (diff) |
second chance
git-svn-id: http://svn.miranda-ng.org/main/trunk@2491 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Utils.pas/protocols.pas | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/plugins/Utils.pas/protocols.pas b/plugins/Utils.pas/protocols.pas index 8ca8eab362..a353a5ada5 100644 --- a/plugins/Utils.pas/protocols.pas +++ b/plugins/Utils.pas/protocols.pas @@ -562,26 +562,44 @@ begin if IsXStatusSupported(uint_ptr(proto)) then
begin
- with ics do
+ if (title<>nil) or (txt<>nil) then
begin
- cbSize:=SizeOf(ics);
- flags:=CSSF_STR_SIZES;
- wParam:=@i;
- lParam:=@j;
+ with ics do
+ begin
+ cbSize:=SizeOf(ics);
+ flags:=CSSF_STR_SIZES;
+ wParam:=@i;
+ lParam:=@j;
+ end;
+ CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
end;
- CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
+
if title<>nil then
+ begin
mGetMem(title^,(i+1)*SizeOf(WideChar));
+ with ics do
+ begin
+ flags :=CSSF_MASK_NAME or CSSF_UNICODE;
+ szName.w:=pWideChar(title^);
+ end;
+ CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
+ end;
+
if txt<>nil then
+ begin
mGetMem(txt^,(j+1)*SizeOf(WideChar));
+ with ics do
+ begin
+ flags:=CSSF_MASK_MESSAGE or CSSF_UNICODE;
+ szMessage.w:=pWideChar(txt^);
+ end;
+ CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
+ end;
with ics do
begin
- cbSize:=SizeOf(ics);
- flags:=CSSF_MASK_STATUS or CSSF_MASK_NAME or CSSF_MASK_MESSAGE or CSSF_UNICODE;
+ flags:=CSSF_MASK_STATUS;
status:=@result;
- szName.w :=pWideChar(title^);
- szMessage.w:=pWideChar(txt^);
end;
CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
|