diff options
author | Alexey Kulakov <panda75@bk.ru> | 2012-11-21 19:42:22 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2012-11-21 19:42:22 +0000 |
commit | fe95e19dc7743834b53c82afcf04c233e40db8db (patch) | |
tree | f571518f1c40cd4b945e64a675ee2a7a29335f16 /plugins/Utils.pas | |
parent | a8f0df159c82d4e1b7d610f302dbc2a09479c341 (diff) |
xstatus api fixes
mradio frame button fix
api updates
git-svn-id: http://svn.miranda-ng.org/main/trunk@2420 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Utils.pas')
-rw-r--r-- | plugins/Utils.pas/cbex.pas | 6 | ||||
-rw-r--r-- | plugins/Utils.pas/protocols.pas | 39 |
2 files changed, 23 insertions, 22 deletions
diff --git a/plugins/Utils.pas/cbex.pas b/plugins/Utils.pas/cbex.pas index 1c683dd3b8..9805b76634 100644 --- a/plugins/Utils.pas/cbex.pas +++ b/plugins/Utils.pas/cbex.pas @@ -19,11 +19,11 @@ var icon:HICON;
buf,buf1:array [0..127] of AnsiChar;
b:array [0..63] of WideChar;
- ics:TICQ_CUSTOM_STATUS;
+ ics:TCUSTOM_STATUS;
begin
result:=0;
SendMessage(wnd,CB_RESETCONTENT,0,0);
- StrCopy(StrCopyE(buf,proto),PS_ICQ_GETCUSTOMSTATUSICON);
+ StrCopy(StrCopyE(buf,proto),PS_GETCUSTOMSTATUSICON);
if ServiceExists(@buf)=0 then
exit;
@@ -32,7 +32,7 @@ begin if il=0 then exit;
cnt:=0;
- StrCopy(StrCopyE(buf1,proto),PS_ICQ_GETCUSTOMSTATUSEX);
+ StrCopy(StrCopyE(buf1,proto),PS_GETCUSTOMSTATUSEX);
cbei.mask:=CBEIF_IMAGE or CBEIF_SELECTEDIMAGE or CBEIF_TEXT; //!!
ics.cbSize :=SizEOf(ics);
diff --git a/plugins/Utils.pas/protocols.pas b/plugins/Utils.pas/protocols.pas index 8b585c39b4..842eb53e85 100644 --- a/plugins/Utils.pas/protocols.pas +++ b/plugins/Utils.pas/protocols.pas @@ -415,7 +415,6 @@ begin end;
for i:=1 to protoCount do
begin
- // active and switched off (but not deleted)
inc(NumProto);
with protos^[NumProto] do
begin
@@ -424,7 +423,7 @@ begin enabled:=psf_all;//psf_enabled;
status :=0;
-// xstat :=-1;
+// xstat :=-1;
flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_2,0);
if (flag and PF2_ONLINE) <>0 then status:=status or psf_online;
if (flag and PF2_INVISIBLE) <>0 then status:=status or psf_invisible;
@@ -440,18 +439,19 @@ begin if ((flag and PF1_CHAT)<>0) or
(DBReadByte(0,name,'CtcpChatAccept',13)<>13) or // IRC
(DBReadByte(0,name,'Jud',13)<>13) then // Jabber
-// flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_1,0);
-// if (flag and PF1_CHAT)<>0 then
+// flag:=CallProtoService(name,PS_GETCAPS,PFLAGNUM_1,0);
+// if (flag and PF1_CHAT)<>0 then
status:=status or psf_chat;
+
p:=StrCopyE(buf,name);
- StrCopy(p,PS_ICQ_GETCUSTOMSTATUS);
+ StrCopy(p,PS_GETCUSTOMSTATUSEX);
if ServiceExists(buf)<>0 then
status:=status or psf_icq;
StrCopy(p,PS_SET_LISTENINGTO);
if ServiceExists(buf)<>0 then
status:=status or psf_tunes;
-
+
end;
inc(proto);
end;
@@ -519,7 +519,7 @@ end; function SetXStatus(proto:PAnsiChar;newstatus:integer;
txt:pWideChar=nil;title:pWideChar=nil):integer;
var
- ics:TICQ_CUSTOM_STATUS;
+ ics:TCUSTOM_STATUS;
begin
result:=0;
if IsXStatusSupported(uint_ptr(proto)) then
@@ -544,23 +544,24 @@ begin szMessage.w:=txt;
end;
end;
- result:=CallProtoService(proto,PS_ICQ_SETCUSTOMSTATUSEX,0,lparam(@ics));
+ result:=CallProtoService(proto,PS_SETCUSTOMSTATUSEX,0,lparam(@ics));
end;
end;
function GetXStatus(proto:PAnsiChar;txt:pointer=nil;title:pointer=nil):integer;
var
+{
buf:array [0..127] of AnsiChar;
pc:PAnsiChar;
param:array [0..63] of AnsiChar;
-
-// ics:TICQ_CUSTOM_STATUS;
-// i,j:integer;
+}
+ ics:TCUSTOM_STATUS;
+ i,j:integer;
begin
result:=0;
if IsXStatusSupported(uint_ptr(proto)) then
begin
-{
+
with ics do
begin
cbSize:=SizeOf(ics);
@@ -568,7 +569,7 @@ begin wParam:=@i;
lParam:=@j;
end;
- CallProtoService(0,PS_ICQ_GETCUSTOMSTATUSEX,0,dword(@ics));
+ CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
if title<>nil then
mGetMem(title^,(i+1)*SizeOf(WideChar));
if txt<>nil then
@@ -579,14 +580,14 @@ begin cbSize:=SizeOf(ics);
flags:=CSSF_MASK_STATUS or CSSF_MASK_NAME or CSSF_MASK_MESSAGE or CSSF_UNICODE;
status:=@result;
- szName.w :=pdword(title)^;
- szMessage.w:=pdword(txt)^;
+ szName.w :=pWideChar(title);
+ szMessage.w:=pWideChar(txt);
end;
- CallProtoService(0,PS_ICQ_GETCUSTOMSTATUSEX,0,dword(@ics));
-}
+ CallProtoService(proto,PS_GETCUSTOMSTATUSEX,0,dword(@ics));
+{
StrCopy(buf,proto);
- StrCat (buf,PS_ICQ_GETCUSTOMSTATUS);
+ StrCat (buf,PS_GETCUSTOMSTATUS);
result:=CallService(buf,0,0);
if (txt<>nil) or (title<>nil) then
begin
@@ -603,7 +604,7 @@ begin StrCopy(pc,'Name'); pWideChar(title^):=DBReadUnicode(0,proto,param,nil);
end;
end;
-
+}
end;
end;
|