From 3e5959daa64de93186b2dceaeaf0a85c0535a5c6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 31 Jul 2014 19:01:27 +0000 Subject: fix for correct info panel closing git-svn-id: http://svn.miranda-ng.org/main/trunk@10007 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/generic_msghandlers.cpp | 2 +- plugins/TabSRMM/src/infopanel.cpp | 7 ++++++- plugins/TabSRMM/src/version.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index b7c5283134..294cd923ce 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -168,7 +168,7 @@ LRESULT TSAPI DM_GenericHotkeysCheck(MSG *message, TWindowData *dat) } break; case TABSRMM_HK_TOGGLEINFOPANEL: - dat->Panel->setActive(dat->Panel->isActive() ? FALSE : TRUE); + dat->Panel->setActive(!dat->Panel->isActive()); dat->Panel->showHide(); return 1; case TABSRMM_HK_EMOTICONS: diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 1adf6eaf6f..c34d587500 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -174,7 +174,12 @@ void CInfoPanel::showHide() const HWND hwndDlg = m_dat->hwnd; if (!m_isChat) { - ::ShowWindow(m_dat->hwndPanelPicParent, (m_active && m_dat->hwndPanelPic) ? SW_SHOW : SW_HIDE); + ::ShowWindow(m_dat->hwndPanelPicParent, (m_active) ? SW_SHOW : SW_HIDE); + + if (!m_active && m_dat->hwndPanelPic) { + ::DestroyWindow(m_dat->hwndPanelPic); + m_dat->hwndPanelPic = NULL; + } m_dat->iRealAvatarHeight = 0; ::AdjustBottomAvatarDisplay(m_dat); diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h index 639209972d..7c93f17150 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 1 +#define __BUILD_NUM 2 #include -- cgit v1.2.3