From fef31c00eeb1cc0af00821b8a1808a005fb7cecf Mon Sep 17 00:00:00 2001 From: Jeremy Paul Wootten Date: Sat, 21 Oct 2023 18:10:10 +0100 Subject: [PATCH 1/5] Expose audible-bell setting in Settings Menu --- src/Widgets/SettingsPopover.vala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Widgets/SettingsPopover.vala b/src/Widgets/SettingsPopover.vala index 032db183e5..5e7d6dc4fb 100644 --- a/src/Widgets/SettingsPopover.vala +++ b/src/Widgets/SettingsPopover.vala @@ -113,6 +113,11 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover { active = Application.settings.get_boolean ("natural-copy-paste") }; + var audible_bell_button = new Granite.SwitchModelButton (_("Audible Bell")) { + description = _("Send an event alert for invalid input or multiple possible completions (subject to system sound settings)."), + active = Application.settings.get_boolean ("audible-bell") + }; + var box = new Gtk.Box (VERTICAL, 6) { margin_bottom = 6, margin_top = 12, @@ -123,6 +128,7 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover { box.add (theme_box); box.add (new Gtk.Separator (HORIZONTAL)); box.add (natural_copy_paste_button); + box.add (audible_bell_button); child = box; custom_button.clicked.connect (() => { From 03d19a9f52f942d5f202c427672cc757b96d05a2 Mon Sep 17 00:00:00 2001 From: Jeremy Paul Wootten Date: Sat, 21 Oct 2023 18:13:02 +0100 Subject: [PATCH 2/5] Remove full stop --- src/Widgets/SettingsPopover.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widgets/SettingsPopover.vala b/src/Widgets/SettingsPopover.vala index 5e7d6dc4fb..6df8fa9da6 100644 --- a/src/Widgets/SettingsPopover.vala +++ b/src/Widgets/SettingsPopover.vala @@ -114,7 +114,7 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover { }; var audible_bell_button = new Granite.SwitchModelButton (_("Audible Bell")) { - description = _("Send an event alert for invalid input or multiple possible completions (subject to system sound settings)."), + description = _("Send an event alert for invalid input or multiple possible completions (subject to system sound settings)"), active = Application.settings.get_boolean ("audible-bell") }; From 12db76aef070bd945b9621938745d2f3077a23be Mon Sep 17 00:00:00 2001 From: Jeremy Paul Wootten Date: Mon, 23 Oct 2023 18:51:18 +0100 Subject: [PATCH 3/5] Add missing binding --- src/Widgets/SettingsPopover.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Widgets/SettingsPopover.vala b/src/Widgets/SettingsPopover.vala index 6df8fa9da6..c93b7191c0 100644 --- a/src/Widgets/SettingsPopover.vala +++ b/src/Widgets/SettingsPopover.vala @@ -145,6 +145,7 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover { Application.settings.bind ("follow-system-style", follow_system_button, "active", DEFAULT); Application.settings.bind ("natural-copy-paste", natural_copy_paste_button, "active", DEFAULT); + Application.settings.bind ("audible-bell", audible_bell_button, "active", DEFAULT); Application.settings.changed.connect ((s, n) => { if (n == "background" || n == "foreground") { From 6a4a2d38c0dc5aca7e7d70eabd89d9001019e458 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Thu, 26 Oct 2023 10:49:11 +0100 Subject: [PATCH 4/5] Update src/Widgets/SettingsPopover.vala MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve audible bell button label Co-authored-by: Danielle Foré --- src/Widgets/SettingsPopover.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widgets/SettingsPopover.vala b/src/Widgets/SettingsPopover.vala index c93b7191c0..95b30c25b1 100644 --- a/src/Widgets/SettingsPopover.vala +++ b/src/Widgets/SettingsPopover.vala @@ -113,7 +113,7 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover { active = Application.settings.get_boolean ("natural-copy-paste") }; - var audible_bell_button = new Granite.SwitchModelButton (_("Audible Bell")) { + var audible_bell_button = new Granite.SwitchModelButton (_("Event Alerts")) { description = _("Send an event alert for invalid input or multiple possible completions (subject to system sound settings)"), active = Application.settings.get_boolean ("audible-bell") }; From 2e33bdb629ac4c7189a8734178c6a41fa1735b10 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Thu, 26 Oct 2023 10:49:44 +0100 Subject: [PATCH 5/5] Update src/Widgets/SettingsPopover.vala MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve tooltip text Co-authored-by: Danielle Foré --- src/Widgets/SettingsPopover.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Widgets/SettingsPopover.vala b/src/Widgets/SettingsPopover.vala index 95b30c25b1..be73ab82cb 100644 --- a/src/Widgets/SettingsPopover.vala +++ b/src/Widgets/SettingsPopover.vala @@ -114,7 +114,7 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover { }; var audible_bell_button = new Granite.SwitchModelButton (_("Event Alerts")) { - description = _("Send an event alert for invalid input or multiple possible completions (subject to system sound settings)"), + description = _("Notify for invalid input or multiple possible completions (subject to System Settings → Sound)"), active = Application.settings.get_boolean ("audible-bell") };