diff options
Diffstat (limited to 'options.cpp')
-rwxr-xr-x[-rw-r--r--] | options.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/options.cpp b/options.cpp index 2905b76..e4c7bd6 100644..100755 --- a/options.cpp +++ b/options.cpp @@ -86,6 +86,7 @@ INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar SetDlgItemText(hwnd, ID_ANSWER, gbAnswer.c_str()); SetDlgItemText(hwnd, ID_CONGRATULATION, gbCongratulation.c_str()); SetDlgItemText(hwnd, ID_AUTHREPL, gbAuthRepl.c_str()); + EnableWindow(GetDlgItem(hwnd, ID_ANSWER), !gbMathExpression); variables_skin_helpbutton(hwnd, IDC_VARS); gbVarsServiceExist?EnableWindow(GetDlgItem(hwnd, IDC_VARS),1):EnableWindow(GetDlgItem(hwnd, IDC_VARS),0); } @@ -278,6 +279,7 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar SendDlgItemMessage(hwnd, IDC_REQAUTH, BM_SETCHECK, gbAutoReqAuth ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage(hwnd, IDC_REGEX, BM_SETCHECK, gbRegexMatch ? BST_CHECKED : BST_UNCHECKED, 0); SendDlgItemMessage(hwnd, IDC_HISTORY_LOG, BM_SETCHECK, gbHistoryLog ? BST_CHECKED : BST_UNCHECKED, 0); + SendDlgItemMessage(hwnd, IDC_MATH_QUESTION, BM_SETCHECK, gbMathExpression ? BST_CHECKED : BST_UNCHECKED, 0 ); SetDlgItemText(hwnd, IDC_AUTOADDGROUP, gbAutoAuthGroup.c_str()); } @@ -285,6 +287,11 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar case WM_COMMAND:{ switch (LOWORD(wParam)) { + case IDC_MATH_DETAILS: + { + MessageBox(NULL, TranslateT("If math expression is turned on you can use following expression in message text:\nXX+XX-X/X*X\neach X will be replaced by one ruandom number and answer will be expression result\nMessage must contain only one expression without spaces"), _T("Info"), MB_OK); + } + break; case IDC_INVIS_DISABLE: case IDC_CASE_INSENSITIVE: case ID_DOS_INTEGRATION: @@ -365,10 +372,13 @@ INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar BST_CHECKED == SendDlgItemMessage(hwnd, IDC_ADDTOSRVLST, BM_GETCHECK, 0, 0)); DBWriteContactSettingByte(NULL, pluginName, "AutoReqAuth", gbAutoReqAuth = BST_CHECKED == SendDlgItemMessage(hwnd, IDC_REQAUTH, BM_GETCHECK, 0, 0)); - DBWriteContactSettingByte(NULL, pluginName, "RegexMatch", gbRegexMatch =
- BST_CHECKED == SendDlgItemMessage(hwnd, IDC_REGEX, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "HistoryLog", gbHistoryLog =
- BST_CHECKED == SendDlgItemMessage(hwnd, IDC_HISTORY_LOG, BM_GETCHECK, 0, 0));
+ DBWriteContactSettingByte(NULL, pluginName, "RegexMatch", gbRegexMatch = + BST_CHECKED == SendDlgItemMessage(hwnd, IDC_REGEX, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "HistoryLog", gbHistoryLog = + BST_CHECKED == SendDlgItemMessage(hwnd, IDC_HISTORY_LOG, BM_GETCHECK, 0, 0)); + DBWriteContactSettingByte(NULL, pluginName, "MathExpression", gbMathExpression = + BST_CHECKED == SendDlgItemMessage(hwnd, IDC_MATH_QUESTION, BM_GETCHECK, 0, 0)); + { static tstring NewAGroupName, CurrentAGroupName; NewAGroupName = GetDlgItemString(hwnd, IDC_AUTOADDGROUP); |