summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-07-09 11:48:11 +0000
committerRobert Pösel <robyer@seznam.cz>2013-07-09 11:48:11 +0000
commit00bccdf5dac64785d736ca979cbbc880a459b083 (patch)
tree591bc30f20eb35618b8464e2052e615be8866399 /src
parentf816d444c3f97b6bd2969a9e742fb051f6143371 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/addcontact/addcontact.cpp11
1 files changed, 9 insertions, 2 deletions
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;