From ac3f91eb034855a46bf428f997a628af891ae998 Mon Sep 17 00:00:00 2001 From: 0xb00bface <0xboobface@gmail.com> Date: Sun, 27 Dec 2020 14:35:18 +0100 Subject: [PATCH] Add setting to show confirmation dialogs for dangerous actions --- client/src/main/java/ctbrec/ui/settings/SettingsTab.java | 3 +++ common/src/main/java/ctbrec/Settings.java | 1 + 2 files changed, 4 insertions(+) diff --git a/client/src/main/java/ctbrec/ui/settings/SettingsTab.java b/client/src/main/java/ctbrec/ui/settings/SettingsTab.java index 9ff186b4..ab9e55e5 100644 --- a/client/src/main/java/ctbrec/ui/settings/SettingsTab.java +++ b/client/src/main/java/ctbrec/ui/settings/SettingsTab.java @@ -89,6 +89,7 @@ public class SettingsTab extends Tab implements TabSelectionListener { private SimpleBooleanProperty updateThumbnails; private SimpleBooleanProperty determineResolution; private SimpleBooleanProperty chooseStreamQuality; + private SimpleBooleanProperty confirmationDialogs; private SimpleBooleanProperty livePreviews; private SimpleBooleanProperty monitorClipboard; private SimpleListProperty startTab; @@ -180,6 +181,7 @@ public class SettingsTab extends Tab implements TabSelectionListener { postProcessingThreads = new SimpleIntegerProperty(null, "postProcessingThreads", settings.postProcessingThreads); onlineCheckSkipsPausedModels = new SimpleBooleanProperty(null, "onlineCheckSkipsPausedModels", settings.onlineCheckSkipsPausedModels); fastScrollSpeed = new SimpleBooleanProperty(null, "fastScrollSpeed", settings.fastScrollSpeed); + confirmationDialogs = new SimpleBooleanProperty(null, "confirmationForDangerousActions", settings.confirmationForDangerousActions); } private void createGui() { @@ -205,6 +207,7 @@ public class SettingsTab extends Tab implements TabSelectionListener { Setting.of("Enable live previews (experimental)", livePreviews), Setting.of("Add models from clipboard", monitorClipboard, "Monitor clipboard for model URLs and automatically add them to the recorder").needsRestart(), Setting.of("Fast scroll speed", fastScrollSpeed, "Makes the thumbnail overviews scroll faster with the mouse wheel").needsRestart(), + Setting.of("Show confirmation dialogs", confirmationDialogs, "Show confirmation dialogs for irreversible actions"), Setting.of("Start Tab", startTab), Setting.of("Colors (Base / Accent)", new ColorSettingsPane(Config.getInstance())).needsRestart() ), diff --git a/common/src/main/java/ctbrec/Settings.java b/common/src/main/java/ctbrec/Settings.java index 0da844be..d120ba3c 100644 --- a/common/src/main/java/ctbrec/Settings.java +++ b/common/src/main/java/ctbrec/Settings.java @@ -55,6 +55,7 @@ public class Settings { public String colorAccent = "#FFFFFF"; public String colorBase = "#FFFFFF"; public int concurrentRecordings = 0; + public boolean confirmationForDangerousActions = false; public boolean determineResolution = false; public List disabledSites = new ArrayList<>(); public String downloadFilename = "${modelSanitizedName}-${localDateTime}";