From e1a3a426a742028570baaee7430b2b5750734e4c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Dec 2017 17:19:20 +0300 Subject: obsolete structure ADDCONTACTSTRUCT, service MS_ADDCONTACT_SHOW and whole m_addcontact.h removed and replaced with Contact_Add* functions --- src/core/stdfile/src/filerecvdlg.cpp | 13 ++++--------- src/core/stdfile/src/stdafx.h | 1 - src/core/stdmsg/src/msgdialog.cpp | 9 ++------- src/core/stdmsg/src/stdafx.h | 1 - 4 files changed, 6 insertions(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index 49d1fcd3b1..9feef53743 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -346,15 +346,10 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l break; case IDC_ADD: - { - ADDCONTACTSTRUCT acs = { 0 }; - acs.hContact = dat->hContact; - acs.handleType = HANDLE_CONTACT; - acs.szProto = ""; - CallService(MS_ADDCONTACT_SHOW, (WPARAM)hwndDlg, (LPARAM)&acs); - if (!db_get_b(dat->hContact, "CList", "NotOnList", 0)) - ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), SW_HIDE); - } + Contact_Add(dat->hContact, hwndDlg); + + if (!db_get_b(dat->hContact, "CList", "NotOnList", 0)) + ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), SW_HIDE); break; case IDC_USERMENU: diff --git a/src/core/stdfile/src/stdafx.h b/src/core/stdfile/src/stdafx.h index cc4b8d3742..512cc93ad7 100644 --- a/src/core/stdfile/src/stdafx.h +++ b/src/core/stdfile/src/stdafx.h @@ -60,7 +60,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 104b5fff31..937bb69857 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1291,13 +1291,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break; case IDC_ADD: - { - ADDCONTACTSTRUCT acs = {}; - acs.hContact = m_hContact; - acs.handleType = HANDLE_CONTACT; - acs.szProto = nullptr; - CallService(MS_ADDCONTACT_SHOW, (WPARAM)m_hwnd, (LPARAM)&acs); - } + Contact_Add(m_hContact, m_hwnd); + if (!db_get_b(m_hContact, "CList", "NotOnList", 0)) ShowWindow(GetDlgItem(m_hwnd, IDC_ADD), FALSE); break; diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 6069356b35..cfdb92aa2a 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -55,7 +55,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include -- cgit v1.2.3