diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-06-16 20:40:57 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-06-16 20:40:57 +0000 |
commit | 6c12bafe804c7d20056a93c72cbe935c10802f9a (patch) | |
tree | ff8aaffaa9cd3cef422f4f4d075d49fe2006c00d /tipper/popwin.cpp | |
parent | 1af4404ec3ac1bc9355e6381bdfcac53a15e5121 (diff) |
- fix for the Unicode status messages
- removed MS_AWAY_GETPROTOSTATUSMESSAGE
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@523 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/popwin.cpp')
-rw-r--r-- | tipper/popwin.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp index e1a6486..26afd34 100644 --- a/tipper/popwin.cpp +++ b/tipper/popwin.cpp @@ -100,20 +100,20 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if(status >= ID_STATUS_OFFLINE && status <= ID_STATUS_IDLE) {
TCHAR *swzText = 0;
char *status_msg = 0;
- if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGET)) {
- TCHAR *temp = (TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto);
- swzText = _tcsdup(temp);
- mir_free(temp);
- } else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE)) {
- status_msg = (char *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGE, (LPARAM)status, (WPARAM)pwd->clcit.proto);
- } else {
- char svc[256];
- mir_snprintf(svc, 256, "%s%s", pwd->clcit.proto, PS_GETMYAWAYMSG);
- if(ServiceExists(svc)) {
- status_msg = (char *)CallService(svc, status, 0);
- } else
- status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0);
+
+ // supported by protocols from Miranda 0.8+
+ char svc[256];
+ mir_snprintf(svc, 256, "%s%s", pwd->clcit.proto, PS_GETMYAWAYMSG);
+ if ( ServiceExists( svc )) {
+ TCHAR* p = (TCHAR *)CallProtoService(pwd->clcit.proto, PS_GETMYAWAYMSG, 0, SGMA_TCHAR);
+ if ( !p )
+ status_msg = (char *)CallProtoService(pwd->clcit.proto, PS_GETMYAWAYMSG, 0, 0);
+ else {
+ swzText = _tcsdup( p );
+ mir_free( p );
+ }
}
+ else status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0);
if(status_msg && status_msg[0]) swzText = a2t(status_msg);
|