From 8ce7f2a163690e9f6830d121149a41aa64e81653 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 9 Nov 2023 14:50:26 +0300 Subject: =?UTF-8?q?fixes=20#3890=20(Alarms:=20=D1=80=D0=B0=D0=B4=D0=B8?= =?UTF-8?q?=D0=BE=D0=B1=D0=BE=D0=BA=D1=81=20"=D0=A0=D0=B5=D1=87=D1=8C"=20?= =?UTF-8?q?=D0=BD=D0=B5=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=B5=D0=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/Alarms/res/resource.rc | 1 - plugins/Alarms/src/options.cpp | 19 +++---------------- plugins/Alarms/src/resource.h | 1 - 3 files changed, 3 insertions(+), 18 deletions(-) (limited to 'plugins/Alarms') 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 -- cgit v1.2.3