From 43b2c1ada4ff0cfa2d915f888d61a498d05a683f Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Fri, 5 Apr 2013 17:53:29 +0000 Subject: - Added ability to open chat window after adding contact (patch from Robyer) git-svn-id: http://svn.miranda-ng.org/main/trunk@4321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/addcontact/addcontact.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/modules/addcontact') diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index f8a755f9ce..30875f70fc 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -102,9 +102,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETCURSEL, 0, 0); /* acs->szProto may be NULL don't expect it */ { - // By default check both checkboxes + // By default check all checkboxes CheckDlgButton(hdlg, IDC_ADDED, BST_CHECKED); CheckDlgButton(hdlg, IDC_AUTH, BST_CHECKED); + CheckDlgButton(hdlg, IDC_OPEN_WINDOW, BST_CHECKED); DWORD flags = (acs->szProto) ? CallProtoServiceInt(NULL,acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0; if (flags&PF4_FORCEADDED) { // force you were added requests for this protocol @@ -196,6 +197,9 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp CallContactService(hContact, PSS_AUTHREQUESTT, 0, (LPARAM)szReason); } } + + if (IsDlgButtonChecked(hdlg, IDC_OPEN_WINDOW)) + CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0); } // fall through case IDCANCEL: -- cgit v1.2.3