From 00bccdf5dac64785d736ca979cbbc880a459b083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 9 Jul 2013 11:48:11 +0000 Subject: Remember last choice of "Open contact's window" checkbox. git-svn-id: http://svn.miranda-ng.org/main/trunk@5294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/addcontact/addcontact.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/modules/addcontact') diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index b6ff5cb2c3..d12b5627e8 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -102,10 +102,13 @@ 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 all checkboxes + // By default check both checkboxes CheckDlgButton(hdlg, IDC_ADDED, BST_CHECKED); CheckDlgButton(hdlg, IDC_AUTH, BST_CHECKED); - CheckDlgButton(hdlg, IDC_OPEN_WINDOW, BST_CHECKED); + + // Set last choice + if (db_get_b(NULL, "Miranda", "AuthOpenWindow", 1)) + 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 @@ -144,6 +147,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp } } break; + case IDC_OPEN_WINDOW: + // Remember this choice + db_set_b(NULL, "Miranda", "AuthOpenWindow", IsDlgButtonChecked(hdlg, IDC_OPEN_WINDOW)); + break; case IDOK: { HANDLE hContact = INVALID_HANDLE_VALUE; -- cgit v1.2.3