summaryrefslogtreecommitdiff
path: root/plugins/Alarms
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-09 14:50:26 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-09 14:50:26 +0300
commit8ce7f2a163690e9f6830d121149a41aa64e81653 (patch)
tree4ff402d50a859e080c5fddf99da2a0d6f701bd17 /plugins/Alarms
parent4afe7f23231220a20c9b54a3c14b99884bdc2e2c (diff)
fixes #3890 (Alarms: радиобокс "Речь" недоступен)
Diffstat (limited to 'plugins/Alarms')
-rw-r--r--plugins/Alarms/res/resource.rc1
-rw-r--r--plugins/Alarms/src/options.cpp19
-rw-r--r--plugins/Alarms/src/resource.h1
3 files changed, 3 insertions, 18 deletions
diff --git a/plugins/Alarms/res/resource.rc b/plugins/Alarms/res/resource.rc
index 7ec19f1851..451b67e17e 100644
--- a/plugins/Alarms/res/resource.rc
+++ b/plugins/Alarms/res/resource.rc
@@ -84,7 +84,6 @@ BEGIN
CONTROL "Alert 1",IDC_RAD_SND1,"Button",BS_AUTORADIOBUTTON | WS_GROUP,105,136,61,10
CONTROL "Alert 2",IDC_RAD_SND2,"Button",BS_AUTORADIOBUTTON,171,136,61,10
CONTROL "Alert 3",IDC_RAD_SND3,"Button",BS_AUTORADIOBUTTON,237,136,61,10
- CONTROL "Speak",IDC_RAD_SPK,"Button",BS_AUTORADIOBUTTON,303,136,61,10
CONTROL "DateTimePicker1",IDC_TIME,"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | WS_TABSTOP | 0x8,174,19,55,13
GROUPBOX "Occurrence",IDC_STATIC,305,9,69,100
CONTROL "Once",IDC_RAD_ONCE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,311,19,58,10
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 1f7fbb429f..07eaa6a6da 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -56,9 +56,6 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_DAYNUM, CB_SETCURSEL, 0, 0);
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
-
- if (!ServiceExists("Speak/Say"))
- EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_SPK), FALSE);
{
AddEditParam *param = (AddEditParam *)lParam;
SendMessage(hwndDlg, WMU_OPTSETALARM, (WPARAM)param->edit, (LPARAM)param->alarm_ptr);
@@ -241,6 +238,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CheckDlgButton(hwndDlg, IDC_CHK_ASOUND, BST_CHECKED);
switch (add_edit_alarm->sound_num) {
case 1:
+ case 4:
CheckDlgButton(hwndDlg, IDC_RAD_SND1, BST_CHECKED);
break;
case 2:
@@ -249,13 +247,6 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case 3:
CheckDlgButton(hwndDlg, IDC_RAD_SND3, BST_CHECKED);
break;
- case 4:
- if (!ServiceExists("Speak/Say")) {
- add_edit_alarm->sound_num = 1;
- CheckDlgButton(hwndDlg, IDC_RAD_SND1, BST_CHECKED);
- }
- else CheckDlgButton(hwndDlg, IDC_RAD_SPK, BST_CHECKED);
- break;
}
}
else {
@@ -598,20 +589,18 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
bChecked = IsDlgButtonChecked(hwndDlg, IDC_CHK_ACOMMAND) != 0;
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_COMMAND), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PARAMS), bChecked);
- // drop through
+ __fallthrough;
case IDC_CHK_ASOUND:
bChecked = IsDlgButtonChecked(hwndDlg, IDC_CHK_ASOUND) != 0;
EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_SND1), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_SND2), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_SND3), bChecked);
- EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_SPK), bChecked);
- // drop though
+ __fallthrough;
case IDC_RAD_SND1:
case IDC_RAD_SND2:
case IDC_RAD_SND3:
- case IDC_RAD_SPK:
case IDC_CHK_SUSPEND:
case IDC_CHK_NOSTARTUP:
case IDC_CHK_NOREMINDER:
@@ -696,8 +685,6 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP
add_edit_alarm->sound_num = 2;
else if (IsDlgButtonChecked(hwndDlg, IDC_RAD_SND3))
add_edit_alarm->sound_num = 3;
- else if (IsDlgButtonChecked(hwndDlg, IDC_RAD_SPK))
- add_edit_alarm->sound_num = 4;
}
else add_edit_alarm->sound_num = 0;
diff --git a/plugins/Alarms/src/resource.h b/plugins/Alarms/src/resource.h
index 790f66e72b..775df0fd4d 100644
--- a/plugins/Alarms/src/resource.h
+++ b/plugins/Alarms/src/resource.h
@@ -44,7 +44,6 @@
#define IDC_RAD_SND1 1034
#define IDC_RAD_SND2 1035
#define IDC_RAD_SND3 1036
-#define IDC_RAD_SPK 1037
#define IDC_RELMIN 1038
#define IDC_ED_ROWHEIGHT 1039
#define IDC_SPIN_ROWHEIGHT 1040