summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/src/data.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-06-12 18:34:23 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-06-12 18:34:23 +0000
commite74411f50d715f467a378ae77d8feee11d03a1a2 (patch)
treeae0f74b6ce47e00163a8550c1bd237f6c4ef20cd /plugins/MyDetails/src/data.cpp
parent7de38a08b97e0554e318b8c25806cef5d47259e6 (diff)
MyDetails: Restored support for core default away messages, replaces SimpleAway with SimpleStatusMsg support
git-svn-id: http://svn.miranda-ng.org/main/trunk@9439 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src/data.cpp')
-rw-r--r--plugins/MyDetails/src/data.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index 8244c6e7b2..66f91b9e93 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -219,6 +219,10 @@ void Protocol::GetStatusMsg(int aStatus, TCHAR *msg, size_t msg_size)
ptrT tmp((TCHAR *)CallProtoService(name, PS_GETMYAWAYMSG, 0, SGMA_TCHAR));
lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
}
+ else if (ServiceExists(MS_AWAYMSG_GETSTATUSMSGT)) {
+ ptrT tmp((TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)aStatus, 0));
+ lcopystr(msg, tmp == NULL ? _T("") : tmp, msg_size);
+ }
}
TCHAR* Protocol::GetStatusMsg()
@@ -439,6 +443,13 @@ Protocol *ProtocolArray::Get(const char *name)
return NULL;
}
+
+bool ProtocolArray::CanSetStatusMsgPerProtocol()
+{
+ return ServiceExists(MS_SIMPLESTATUSMSG_CHANGESTATUSMSG) != 0;
+}
+
+
void ProtocolArray::GetAvatars()
{
for (int i = 0; i < buffer_len; i++)
@@ -547,6 +558,12 @@ TCHAR *ProtocolArray::GetDefaultStatusMsg(int status)
if (status == ID_STATUS_CONNECTING)
status = ID_STATUS_OFFLINE;
+ TCHAR *tmp = (TCHAR *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)status, 0);
+ if (tmp != NULL) {
+ lstrcpyn(default_status_message, tmp, SIZEOF(default_status_message));
+ mir_free(tmp);
+ }
+
return default_status_message;
}