diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-10-05 05:37:14 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-10-05 05:37:14 +0000 |
commit | cda4bce6aea57e3c131e281551ad0b3f9f907932 (patch) | |
tree | 7146359f5911df4ae3f5172191e995b994687937 | |
parent | 4bde5895768659f0d1dad4dddc700ea44d4f96f8 (diff) |
Removed unneeded redraw
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@543 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | tipper/popwin.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp index ac6143c..6e8ac5c 100644 --- a/tipper/popwin.cpp +++ b/tipper/popwin.cpp @@ -620,24 +620,31 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa break;
case PUM_SETSTATUSTEXT:
+ if (pwd && (HANDLE)wParam == pwd->hContact)
{
- if(pwd && (HANDLE)wParam == pwd->hContact) {
- // in case we have the status message in a row
- DBWriteContactSettingTString(pwd->hContact, MODULE, "TempStatusMsg", (TCHAR*)lParam);
- SendMessage(hwnd, PUM_REFRESH_VALUES, 0, 0);
+ // in case we have the status message in a row
+ DBVARIANT dbv;
+ if (!DBGetContactSettingTString(pwd->hContact, MODULE, "TempStatusMsg", &dbv))
+ {
+ if (_tcscmp(dbv.ptszVal, (TCHAR*)lParam))
+ {
+ DBWriteContactSettingTString(pwd->hContact, MODULE, "TempStatusMsg", (TCHAR*)lParam);
+ SendMessage(hwnd, PUM_REFRESH_VALUES, 0, 0);
+ }
+ DBFreeVariant(&dbv);
}
- if(lParam) free((void *)lParam);
}
+ if(lParam) free((void *)lParam);
return TRUE;
+
case PUM_SETAVATAR:
- {
- if(pwd && (HANDLE)wParam == pwd->hContact) {
- SendMessage(hwnd, PUM_GETHEIGHT, 0, 0); // calculate window height
- SendMessage(hwnd, PUM_CALCPOS, 0, 0);
- InvalidateRect(hwnd, 0, TRUE);
- }
+ if(pwd && (HANDLE)wParam == pwd->hContact) {
+ SendMessage(hwnd, PUM_GETHEIGHT, 0, 0); // calculate window height
+ SendMessage(hwnd, PUM_CALCPOS, 0, 0);
+ InvalidateRect(hwnd, 0, TRUE);
}
return TRUE;
+
case PUM_REFRESH_VALUES:
if(pwd && pwd->clcit.proto == 0 && pwd->text_tip == false) {
for(int i = 0; i < pwd->row_count; i++) {
|