diff options
Diffstat (limited to 'tipper')
-rw-r--r-- | tipper/message_pump.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp index 6738b96..6f9f18a 100644 --- a/tipper/message_pump.cpp +++ b/tipper/message_pump.cpp @@ -145,7 +145,7 @@ int ShowTipW(WPARAM wParam, LPARAM lParam) { clcit2->text = 0;
if(wParam) { // wParam is char pointer containing text - e.g. status bar tooltip
- clcit2->text = _tcsdup((TCHAR *)wParam); + clcit2->text = _tcsdup((TCHAR *)wParam);
GetCursorPos(&clcit2->ptCursor);
}
@@ -162,8 +162,22 @@ int HideTip(WPARAM wParam, LPARAM lParam) { int ProtoAck(WPARAM wParam, LPARAM lParam) {
ACKDATA *ack = (ACKDATA *)lParam;
char *szMsg = (char *)ack->lParam;
- if(ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS && szMsg && szMsg[0]) {
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)a2t(szMsg));
+ if(ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS)
+ {
+#ifdef _UNICODE
+ DBVARIANT dbv;
+ bool unicode = !DBGetContactSetting(dat->hContact, "CList", "StatusMsg", &dbv) &&
+ (dbv.type == DBVT_UTF8 || dbv.type == DBVT_WCHAR);
+ DBFreeVariant(&dbv);
+ if (unicode) {
+ DBGetContactSettingWString(dat->hContact, "CList", "StatusMsg", &dbv);
+ PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)_wcsdup(dbv.pwszVal));
+ DBFreeVariant(&dbv);
+ }
+ else
+#endif
+ if (szMsg && szMsg[0])
+ PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)a2t(szMsg));
}
return 0;
}
|