Skip to content

Commit

Permalink
Expose audible-bell setting in Settings Menu (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten committed Oct 26, 2023
1 parent c9a60a3 commit 94321c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Widgets/SettingsPopover.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 (_("Event Alerts")) {
description = _("Notify for invalid input or multiple possible completions (subject to System SettingsSound)"),
active = Application.settings.get_boolean ("audible-bell")
};

var box = new Gtk.Box (VERTICAL, 6) {
margin_bottom = 6,
margin_top = 12,
Expand All @@ -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 (() => {
Expand All @@ -139,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") {
Expand Down

0 comments on commit 94321c0

Please sign in to comment.