diff options
Diffstat (limited to 'otr/options.cpp')
-rw-r--r-- | otr/options.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/otr/options.cpp b/otr/options.cpp index cee195e..4334362 100644 --- a/otr/options.cpp +++ b/otr/options.cpp @@ -112,6 +112,9 @@ void LoadOptions() { options.delete_history = (DBGetContactSettingByte(0, MODULE, "DeleteHistory", 1) == 1);
options.timeout_finished = (DBGetContactSettingByte(0, MODULE, "TimeoutFinished", 0) == 1);
+ options.end_offline = (DBGetContactSettingByte(0, MODULE, "EndOffline", 1) == 1);
+ options.end_window_close = (DBGetContactSettingByte(0, MODULE, "EndWindowClose", 0) == 1);
+
LoadFilenames();
}
@@ -129,6 +132,9 @@ void SaveOptions(ContactPolicyMap *contact_policies) { DBWriteContactSettingByte(0, MODULE, "DeleteHistory", options.delete_history ? 1 : 0);
DBWriteContactSettingByte(0, MODULE, "TimeoutFinished", options.timeout_finished ? 1 : 0);
+
+ DBWriteContactSettingByte(0, MODULE, "EndOffline", options.end_offline ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "EndWindowClose", options.end_window_close ? 1 : 0);
}
ContactFingerprintMap strlist; // temp storage for fingerprint string pointers
@@ -234,7 +240,10 @@ INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar CheckDlgButton(hwndDlg, IDC_CHK_PREFIX, options.prefix_messages ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_CHK_MSGINLINE, options.msg_inline ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_CHK_TIMEFINISH, options.timeout_finished ? TRUE : FALSE);
-
+
+ CheckDlgButton(hwndDlg, IDC_CHK_ENDOFFLINE, options.end_offline ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_CHK_ENDCLOSE, options.end_window_close ? TRUE : FALSE);
+
SetDlgItemText(hwndDlg, IDC_ED_PREFIX, options.prefix);
return TRUE;
@@ -355,6 +364,8 @@ INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar case IDC_CHK_PREFIX:
case IDC_CHK_TIMEFINISH:
case IDC_CHK_MSGINLINE:
+ case IDC_CHK_ENDOFFLINE:
+ case IDC_CHK_ENDCLOSE:
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
return TRUE;
}
@@ -482,6 +493,10 @@ INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar options.prefix_messages = IsDlgButtonChecked(hwndDlg, IDC_CHK_PREFIX) ? true : false;
options.msg_inline = IsDlgButtonChecked(hwndDlg, IDC_CHK_MSGINLINE) ? true : false;
options.timeout_finished = IsDlgButtonChecked(hwndDlg, IDC_CHK_TIMEFINISH) ? true : false;
+
+ options.end_offline = IsDlgButtonChecked(hwndDlg, IDC_CHK_ENDOFFLINE) ? true : false;
+ options.end_window_close = IsDlgButtonChecked(hwndDlg, IDC_CHK_ENDCLOSE) ? true : false;
+
GetDlgItemText(hwndDlg, IDC_ED_PREFIX, options.prefix, 64);
ContactPolicyMap *contact_policies = (ContactPolicyMap *)GetWindowLong(hwndDlg, GWL_USERDATA);
|