summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-09 08:32:24 +0300
committerPaul Buetow <paul@buetow.org>2026-04-09 08:32:24 +0300
commit034506aed7c3843143878fa0f5c9b99deef0d358 (patch)
tree70b2f1ab4c9cca87550dde67833f8715cf92af32
parent5247a201c8ba77329c7b1ee40da7b8e43a56b567 (diff)
Add auto-log shared text preference
-rw-r--r--main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.go b/main.go
index ea16eee..79a9d4c 100644
--- a/main.go
+++ b/main.go
@@ -55,15 +55,19 @@ func createPreferenceWindow(a fyne.App) fyne.Window {
window := a.NewWindow("Preferences")
directoryPreference := widget.NewEntry()
directoryPreference.SetText(a.Preferences().StringWithFallback("Directory", defaultDirectory))
+ autoLogSharedTextPreference := widget.NewCheck("Auto-log shared text", nil)
+ autoLogSharedTextPreference.SetChecked(a.Preferences().BoolWithFallback("AutoLogSharedText", false))
window.SetContent(container.NewVBox(
container.NewVBox(
widget.NewLabel("Directory:"),
directoryPreference,
),
+ autoLogSharedTextPreference,
container.NewHBox(
widget.NewButton("Save", func() {
a.Preferences().SetString("Directory", directoryPreference.Text)
+ a.Preferences().SetBool("AutoLogSharedText", autoLogSharedTextPreference.Checked)
window.Hide()
}),
)))