From 01b90e89e84ceea63fd9351c05972a797af698df Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Feb 2017 16:56:05 +0300 Subject: fix for IDC_ADD button --- plugins/Scriver/src/utils.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/Scriver/src/utils.cpp') diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 11a012b094..a615d5dd5b 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -434,7 +434,7 @@ void SetToolTipRect(HWND hwndParent, HWND hwndTT, RECT *rect) SendMessage(hwndTT, TTM_NEWTOOLRECT, 0, (LPARAM)&ti); } -void SetButtonsPos(HWND hwndDlg, bool bShow) +void SetButtonsPos(HWND hwndDlg, MCONTACT hContact, bool bShow) { HDWP hdwp = BeginDeferWindowPos(Srmm_GetButtonCount()); @@ -453,6 +453,12 @@ void SetButtonsPos(HWND hwndDlg, bool bShow) if (hwndButton == NULL) continue; + if (cbd->m_dwButtonCID == IDC_ADD) + if (!db_get_b(hContact, "CList", "NotOnList", 0)) { + ShowWindow(hwndButton, SW_HIDE); + continue; + } + ShowWindow(hwndButton, bShow ? SW_SHOW : SW_HIDE); int width = iGap + cbd->m_iButtonWidth; -- cgit v1.2.3