summaryrefslogtreecommitdiff
path: root/plugins/MyDetails/src/data.cpp
diff options
context:
space:
mode:
authorEugene Lishnevsky <elishnevsky@gmail.com>2012-07-25 21:07:09 +0000
committerEugene Lishnevsky <elishnevsky@gmail.com>2012-07-25 21:07:09 +0000
commitf9179681f381087090d51d4b613a6e506ed6c203 (patch)
tree7d825e37aefb12a03d0f4285a3f6aa5a0e8c4409 /plugins/MyDetails/src/data.cpp
parent0715d02f1fca1e0d31c400a323e32c5185ca4fbd (diff)
Fixed status name and message display in MyDetails for ICQ and Jabber.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MyDetails/src/data.cpp')
-rw-r--r--plugins/MyDetails/src/data.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index c29af17ed0..0191a6b806 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -126,46 +126,31 @@ int Protocol::GetStatus()
if (old_status != status)
data_changed = true;
- if (/*status > ID_STATUS_OFFLINE &&*/ ProtoServiceExists(name, PS_ICQ_GETCUSTOMSTATUS))
- {
- custom_status = CallProtoService(name, PS_ICQ_GETCUSTOMSTATUS, (WPARAM) &custom_status_name,
- (LPARAM) &custom_status_message);
- }
+ if (ProtoServiceExists(name, PS_ICQ_GETCUSTOMSTATUS))
+ custom_status = CallProtoService(name, PS_ICQ_GETCUSTOMSTATUS, (WPARAM) &custom_status_name, (LPARAM) &custom_status_message);
else
- {
custom_status = 0;
- }
- if (custom_status == 0)
- {
+ if (custom_status == 0) {
TCHAR *tmp = (TCHAR*) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, status, GSMDF_TCHAR);
lcopystr(status_name, tmp, SIZEOF(status_name));
- }
- else
- {
+ } else {
DBVARIANT dbv;
TCHAR tmp[256]; tmp[0] = 0;
- if (custom_status_name != NULL && custom_status_name[0] != '\0'
- && !DBGetContactSettingTString(0, name, _T2A(custom_status_name), &dbv))
- {
+ if (custom_status_name != NULL && custom_status_name[0] != '\0' && !DBGetContactSettingTString(0, name, custom_status_name, &dbv)) {
if (dbv.ptszVal != NULL && dbv.ptszVal[0] != _T('\0'))
lstrcpyn(tmp, dbv.ptszVal, SIZEOF(tmp));
else
lstrcpyn(tmp, TranslateT("<no status name>"), SIZEOF(tmp));
DBFreeVariant(&dbv);
- }
- else
- {
+ } else {
lstrcpyn(tmp, TranslateT("<no status name>"), SIZEOF(tmp));
}
- if (custom_status_message != NULL && custom_status_message[0] != '\0'
- && !DBGetContactSettingTString(0, name, _T2A(custom_status_message), &dbv))
- {
- if (dbv.ptszVal != NULL && dbv.ptszVal[0] != '\0')
- {
+ if (custom_status_message != NULL && custom_status_message[0] != '\0' && !DBGetContactSettingTString(0, name, custom_status_message, &dbv)) {
+ if (dbv.ptszVal != NULL && dbv.ptszVal[0] != '\0') {
int len = lstrlen(tmp);
if (len < SIZEOF(tmp))