summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-27 16:56:05 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-27 17:00:24 +0300
commit01b90e89e84ceea63fd9351c05972a797af698df (patch)
treee813547384973489994ff43e393c2b4d861fe3d9 /plugins/Scriver/src/utils.cpp
parent5acc73ee5648a0d8c7065611043fca5297ef0682 (diff)
fix for IDC_ADD button
Diffstat (limited to 'plugins/Scriver/src/utils.cpp')
-rw-r--r--plugins/Scriver/src/utils.cpp8
1 files changed, 7 insertions, 1 deletions
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;