diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-11 17:01:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-11 17:01:26 +0300 |
commit | 22977408e43caa45687e0c9d5a003b800700bea9 (patch) | |
tree | fea533846f3297c8fe02044e26df9af1808f85dc /plugins/TabSRMM | |
parent | cfd7dee86b0cc9eb8ac8c87e9b2b4b356d462056 (diff) |
if a user's avatar was changed, redraw it and all related objects (including thumb window in a taskbar)
fixes #1249
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/functions.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/version.h | 2 |
6 files changed, 23 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index 63320135e6..1027d21c3b 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -31,6 +31,7 @@ class CImageItem;
+int AvatarChanged(WPARAM wParam, LPARAM lParam);
int MyAvatarChanged(WPARAM wParam, LPARAM lParam);
int IconsChanged(WPARAM wParam, LPARAM lParam);
int IcoLibIconsChanged(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index ba03372f6f..6ab4e3d396 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -235,14 +235,15 @@ void CGlobals::hookSystemEvents() {
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SKIN_ICONSCHANGED, ::IconsChanged);
+ HookEvent(ME_SKIN2_ICONSCHANGED, ::IcoLibIconsChanged);
HookEvent(ME_PROTO_CONTACTISTYPING, CMimAPI::TypingMessage);
HookEvent(ME_PROTO_ACK, CMimAPI::ProtoAck);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreshutdownSendRecv);
HookEvent(ME_SYSTEM_OKTOEXIT, OkToExit);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, CMimAPI::PrebuildContactMenu);
-
- HookEvent(ME_SKIN2_ICONSCHANGED, ::IcoLibIconsChanged);
+
+ HookEvent(ME_AV_AVATARCHANGED, ::AvatarChanged);
HookEvent(ME_AV_MYAVATARCHANGED, ::MyAvatarChanged);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 9ad0a15ea4..4131d2a048 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2472,15 +2472,17 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_ACTIVATE:
if (LOWORD(wParam) != WA_ACTIVE)
break;
+ // fall through
- //fall through
case WM_MOUSEACTIVATE:
MsgWindowUpdateState(WM_ACTIVATE);
return 1;
case DM_UPDATEPICLAYOUT:
- LoadContactAvatar();
- Resize();
+ if (wParam == 0 || wParam == m_hContact) {
+ LoadContactAvatar();
+ Resize();
+ }
return 0;
case DM_SPLITTERMOVED:
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 94ff7530a0..5e792de93a 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1329,6 +1329,9 @@ void CSrmmWindow::LoadContactAvatar() }
else if (m_pPanel.isActive())
GetAvatarVisibility();
+
+ if (m_pWnd != nullptr)
+ m_pWnd->verifyDwmState();
}
void CSrmmWindow::LoadOwnAvatar()
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index efb25389cb..3d3c676de8 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -494,6 +494,16 @@ int SplitmsgShutdown(void) return 0;
}
+int AvatarChanged(WPARAM wParam, LPARAM lParam)
+{
+ if (wParam == 0)
+ return 0;
+
+ for (TContainerData *p = pFirstContainer; p; p = p->pNext)
+ BroadCastContainer(p, DM_UPDATEPICLAYOUT, wParam, lParam);
+ return 0;
+}
+
int MyAvatarChanged(WPARAM wParam, LPARAM lParam)
{
if (wParam == 0 || IsBadReadPtr((void*)wParam, 4))
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 87d0b64f7c..f1f5900af8 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3
#define __MINOR_VERSION 5
#define __RELEASE_NUM 0
-#define __BUILD_NUM 8
+#define __BUILD_NUM 9
#include <stdver.h>
|