Skip to content

Commit

Permalink
OH THIS WORKS
Browse files Browse the repository at this point in the history
  • Loading branch information
teamcons committed Nov 3, 2024
1 parent 85d3446 commit 17c5971
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 @@ -112,6 +112,11 @@ public sealed class Terminal.SettingsPopover : Gtk.Popover {
description = _("Shortcuts dont require Shift; may interfere with CLI apps"),
active = Application.settings.get_boolean ("natural-copy-paste")
};

var unsafe_paste_alert_button = new Granite.SwitchModelButton (_("Unsafe Paste Alert")) {
description = _("Show a warning dialog when pasting a command with 'sudo' or multiple lines"),
active = Application.settings.get_boolean ("unsafe-paste-alert")
};

var audible_bell_button = new Granite.SwitchModelButton (_("Event Alerts")) {
description = _("Notify for invalid input or multiple possible completions (subject to System SettingsSound)"),
Expand All @@ -128,6 +133,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 (unsafe_paste_alert_button);
box.add (audible_bell_button);
child = box;

Expand All @@ -145,6 +151,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 ("unsafe-paste-alert", unsafe_paste_alert_button, "active", DEFAULT);
Application.settings.bind ("audible-bell", audible_bell_button, "active", DEFAULT);

Application.settings.changed.connect ((s, n) => {
Expand Down

0 comments on commit 17c5971

Please sign in to comment.