From 262955b51eb11e3f8e38546d716f9820231854e1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Aug 2014 13:07:31 +0000 Subject: fix for displaying avatars in tabSRMM when "Display avatars" option is "always on" git-svn-id: http://svn.miranda-ng.org/main/trunk@10164 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msgdialog.cpp | 2 +- plugins/TabSRMM/src/msgdlgutils.cpp | 13 ++++++------- plugins/TabSRMM/src/version.h | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index e82389f857..b9da26406e 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1650,7 +1650,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dat->rcPic = rc; if (dat->bShowInfoAvatar) { - SetWindowPos(dat->hwndPanelPicParent, HWND_TOP, rc.left - 2, rc.top, rc.right - rc.left, (rc.bottom - rc.top) + 1, 0); + SetWindowPos(dat->hwndPanelPicParent, HWND_TOP, rc.left - 2, rc.top, rc.right - rc.left, rc.bottom - rc.top + 1, 0); ShowWindow(dat->hwndPanelPicParent, (dat->iPanelAvatarX == 0) || !dat->Panel->isActive() ? SW_HIDE : SW_SHOW); } else { diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 584854f756..46f1a0e2a4 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -614,18 +614,17 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) case 3: // on, if present case 1: HBITMAP hbm = (dat->ace && !(dat->ace->dwFlags & AVS_HIDEONCLIST)) ? dat->ace->hbmPic : 0; - - if (!dat->hwndContactPic) - dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL); - dat->bShowAvatar = (hbm && hbm != PluginConfig.g_hbmUnknown); break; } - if (dat->bShowAvatar) + if (dat->bShowAvatar) { + if (!dat->hwndContactPic) + dat->hwndContactPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL); + dat->bShowAvatar = hideOverride == 0 ? 0 : dat->bShowAvatar; - else - dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar; + } + else dat->bShowAvatar = hideOverride == 1 ? 1 : dat->bShowAvatar; // reloads avatars if (dat->hwndPanelPic) { // shows contact or user picture, depending on panel visibility diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 7c93f17150..10609f7680 100644 --- a/plugins/TabSRMM/src/version.h +++ b/plugins/TabSRMM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 3 #define __MINOR_VERSION 4 #define __RELEASE_NUM 0 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #include -- cgit v1.2.3