diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-29 09:47:07 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-29 09:47:07 +0000 |
commit | 1789d473b341d4e7362c0a08ffc3d4624e61f773 (patch) | |
tree | 77f7c5ec9a6e0759483687c142228689fb46619d | |
parent | 1dee19d1535810463918256017c952d60182220c (diff) |
TioDuke patches again - thanks (fix corrupted status message, and 'flickering')
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@67 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | tipper/message_pump.cpp | 20 | ||||
-rw-r--r-- | tipper/popwin.cpp | 4 | ||||
-rw-r--r-- | tipper/subst.cpp | 2 | ||||
-rw-r--r-- | tipper/tipper.mdsp | 4 | ||||
-rw-r--r-- | tipper/version.h | 2 |
5 files changed, 9 insertions, 23 deletions
diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp index 66013b7..01f172e 100644 --- a/tipper/message_pump.cpp +++ b/tipper/message_pump.cpp @@ -160,24 +160,8 @@ 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) {
- /*
- int size = MultiByteToWideChar(code_page, 0, szMsg, -1, 0, 0);
- if(size > 1) {
- wchar_t *msg = (wchar_t *)malloc(size * sizeof(wchar_t));
- MultiByteToWideChar(code_page, 0, (char *) szMsg, -1, msg, size);
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)msg);
- }
- */
- /*
- int size = MultiByteToWideChar(CP_UTF8, 0, szMsg, -1, 0, 0);
- if(size > 1) {
- wchar_t *msg = (wchar_t *)malloc(size * sizeof(wchar_t));
- MultiByteToWideChar(CP_UTF8, 0, (char *) szMsg, -1, msg, size);
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)msg);
- }
- */
- PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)u2t(szMsg));
+ if(ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS && szMsg && szMsg[0]) {
+ PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)a2t(szMsg));
}
return 0;
}
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp index a092663..bddb175 100644 --- a/tipper/popwin.cpp +++ b/tipper/popwin.cpp @@ -205,7 +205,9 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->iconIndex = (int)CallService(MS_CLIST_GETCONTACTICON, (WPARAM)pwd->hContact, 0); // don't use stored status message - DBDeleteContactSetting(pwd->hContact, MODULE, "TempStatusMsg"); + // problem with delete setting? + //DBDeleteContactSetting(pwd->hContact, MODULE, "TempStatusMsg"); + DBWriteContactSettingTString(pwd->hContact, MODULE, "TempStatusMsg", _T("")); if(unicode_system) { TCHAR *stzCDN = (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)pwd->hContact, GCDNF_TCHAR); diff --git a/tipper/subst.cpp b/tipper/subst.cpp index 92f35ef..f7e7f5d 100644 --- a/tipper/subst.cpp +++ b/tipper/subst.cpp @@ -147,7 +147,7 @@ TCHAR *GetStatusMessageText(HANDLE hContact) { TCHAR *ret = 0; DBVARIANT dbv; if(!DBGetContactSettingTString(hContact, MODULE, "TempStatusMsg", &dbv)) { - if(dbv.ptszVal && dbv.ptszVal[0]) { + if(dbv.type != DBVT_DELETED && dbv.ptszVal && dbv.ptszVal[0]) { ret = _tcsdup(dbv.ptszVal); StripBBCodesInPlace(ret); } else CallContactService(hContact, PSS_GETAWAYMSG, 0, 0); diff --git a/tipper/tipper.mdsp b/tipper/tipper.mdsp index 7aceee5..cab97b4 100644 --- a/tipper/tipper.mdsp +++ b/tipper/tipper.mdsp @@ -104,6 +104,6 @@ extraResourceOptions= 1=resource.rc
[Other]
[History]
-tipper.cpp,3306
version.h,750
-message_pump.cpp,4300
+tipper.cpp,3285
+message_pump.cpp,4381
diff --git a/tipper/version.h b/tipper/version.h index 5dae0b6..b49bbe2 100644 --- a/tipper/version.h +++ b/tipper/version.h @@ -4,7 +4,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 3
#define __RELEASE_NUM 0
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|