summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/utils.cpp
diff options
context:
space:
mode:
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;