diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-20 13:36:00 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-20 13:36:00 +0000 |
commit | 5b378496114ec47ffa27d3d9e7bc2a744d9e0a77 (patch) | |
tree | f7550dadde23f61182af6e542101eb5fedfa2d85 /plugins/ListeningTo | |
parent | 0ba80eef50988ca3e88a16839eaf0a840f1cb139 (diff) |
- all xstatus services moved to m_xstatus.h
- old obsoleted services PS_GETXSTATUS & PS_SETXSTATUS removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@2390 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ListeningTo')
-rw-r--r-- | plugins/ListeningTo/src/commons.h | 2 | ||||
-rw-r--r-- | plugins/ListeningTo/src/listeningto.cpp | 29 |
2 files changed, 15 insertions, 16 deletions
diff --git a/plugins/ListeningTo/src/commons.h b/plugins/ListeningTo/src/commons.h index 36f9fa0a34..29915aa334 100644 --- a/plugins/ListeningTo/src/commons.h +++ b/plugins/ListeningTo/src/commons.h @@ -56,7 +56,7 @@ Boston, MA 02111-1307, USA. #include <m_radio.h>
#include <m_toptoolbar.h>
#include <m_icolib.h>
-#include <m_icq.h>
+#include <m_xstatus.h>
#include <m_variables.h>
#include <m_clui.h>
#include <m_cluiframes.h>
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 538dc8ba89..931270ff1b 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -226,8 +226,7 @@ void RebuildMenu() void RegisterProtocol(char *proto, TCHAR *account)
{
- if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) &&
- !ProtoServiceExists(proto, PS_ICQ_SETCUSTOMSTATUSEX))
+ if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) && !ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX))
return;
size_t id = proto_items.size();
@@ -578,13 +577,13 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) if (ProtoServiceExists(proto, PS_SET_LISTENINGTO))
CallProtoService(proto, PS_SET_LISTENINGTO, 0, (LPARAM) lti);
- else if (ProtoServiceExists(proto, PS_ICQ_SETCUSTOMSTATUSEX)) {
+ else if (ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX)) {
if (opts.xstatus_set == IGNORE_XSTATUS)
return;
int status;
- ICQ_CUSTOM_STATUS ics = {0};
- ics.cbSize = sizeof(ICQ_CUSTOM_STATUS);
+ CUSTOM_STATUS ics = {0};
+ ics.cbSize = sizeof(CUSTOM_STATUS);
ics.status = &status;
// Set or reset?
@@ -592,7 +591,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) {
// Reset -> only if is still in music xstatus
ics.flags = CSSF_MASK_STATUS;
- if (CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC)
+ if (CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC)
{
if (opts.xstatus_set == SET_XSTATUS)
{
@@ -623,14 +622,14 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.ptszName = name.str;
ics.ptszMessage = msg.str;
- CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
+ CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
}
else if (opts.xstatus_set == CHECK_XSTATUS)
{
status = 0;
ics.flags = CSSF_MASK_STATUS;
- CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
+ CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
}
else
{
@@ -649,7 +648,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.flags = CSSF_MASK_STATUS;
}
- CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
+ CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
if (pi != NULL)
{
@@ -665,20 +664,20 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) if (opts.xstatus_set == CHECK_XSTATUS_MUSIC)
{
ics.flags = CSSF_MASK_STATUS;
- if (CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC)
+ if (CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) || status != XSTATUS_MUSIC)
return;
}
else if (opts.xstatus_set == CHECK_XSTATUS)
{
ics.flags = CSSF_MASK_STATUS;
- if (!CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC && status != 0)
+ if (!CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC && status != 0)
return;
}
else
{
// Store old data
ics.flags = CSSF_MASK_STATUS;
- if (!CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC)
+ if (!CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics) && status != XSTATUS_MUSIC)
{
ProtocolInfo *pi = GetProtoInfo(proto);
if (pi != NULL)
@@ -688,7 +687,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.ptszName = pi->old_xstatus_name;
ics.ptszMessage = pi->old_xstatus_message;
- CallProtoService(proto, PS_ICQ_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
+ CallProtoService(proto, PS_GETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
}
}
}
@@ -717,7 +716,7 @@ void SetListeningInfo(char *proto, LISTENINGTOINFO *lti) ics.ptszName = name.str;
ics.ptszMessage = msg.str;
- CallProtoService(proto, PS_ICQ_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
+ CallProtoService(proto, PS_SETCUSTOMSTATUSEX, 0, (LPARAM) &ics);
mir_free(fr[1]);
}
@@ -756,7 +755,7 @@ INT_PTR EnableListeningTo(WPARAM wParam,LPARAM lParam) else
{
if (!ProtoServiceExists(proto, PS_SET_LISTENINGTO) &&
- !ProtoServiceExists(proto, PS_ICQ_SETCUSTOMSTATUSEX) &&
+ !ProtoServiceExists(proto, PS_SETCUSTOMSTATUSEX) &&
!ProtoServiceExists(proto, PS_SETAWAYMSGT)) // by yaho
return 0;
|