Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose audible-bell setting in Settings Menu #740

Merged
merged 5 commits into from
Oct 26, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 (_("Audible Bell")) {
jeremypw marked this conversation as resolved.
Show resolved Hide resolved
description = _("Send an event alert for invalid input or multiple possible completions (subject to system sound settings)"),
jeremypw marked this conversation as resolved.
Show resolved Hide resolved
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