diff options
author | Eugene Lishnevsky <elishnevsky@gmail.com> | 2012-07-25 21:07:09 +0000 |
---|---|---|
committer | Eugene Lishnevsky <elishnevsky@gmail.com> | 2012-07-25 21:07:09 +0000 |
commit | f9179681f381087090d51d4b613a6e506ed6c203 (patch) | |
tree | 7d825e37aefb12a03d0f4285a3f6aa5a0e8c4409 /plugins/MyDetails | |
parent | 0715d02f1fca1e0d31c400a323e32c5185ca4fbd (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')
-rw-r--r-- | plugins/MyDetails/src/data.cpp | 31 | ||||
-rw-r--r-- | plugins/MyDetails/src/data.h | 4 | ||||
-rw-r--r-- | plugins/MyDetails/src/frame.cpp | 4 |
3 files changed, 12 insertions, 27 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))
diff --git a/plugins/MyDetails/src/data.h b/plugins/MyDetails/src/data.h index d8c75beda4..468bc6c590 100644 --- a/plugins/MyDetails/src/data.h +++ b/plugins/MyDetails/src/data.h @@ -42,9 +42,9 @@ public: TCHAR description[256];
TCHAR nickname[256];
TCHAR status_name[256];
- TCHAR *custom_status_name;
+ char *custom_status_name;
TCHAR status_message[1024];
- TCHAR *custom_status_message;
+ char *custom_status_message;
TCHAR listening_to[1024];
AVATARCACHEENTRY *ace;
TCHAR avatar_file[1024];
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index baaf0b26dd..a66ea01cc7 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -2672,10 +2672,10 @@ int SettingsChangedHook(WPARAM wParam, LPARAM lParam) if ( !strcmp(cws->szSetting,"Status")
|| ( proto != NULL && proto->custom_status != 0
&& proto->custom_status_name != NULL
- && !strcmp(cws->szSetting, _T2A(proto->custom_status_name)))
+ && !strcmp(cws->szSetting, proto->custom_status_name))
|| ( proto != NULL && proto->custom_status != 0
&& proto->custom_status_message != NULL
- && !strcmp(cws->szSetting, _T2A(proto->custom_status_message))))
+ && !strcmp(cws->szSetting, proto->custom_status_message)))
{
// Status changed
if (proto != NULL)
|