1
0
mirror of https://github.com/taigrr/crocgui synced 2025-01-18 04:03:16 -08:00

save default settings

This commit is contained in:
Chris Howey 2021-03-24 14:11:08 -05:00
parent f9c5813713
commit ebe2f1d6d3
2 changed files with 9 additions and 7 deletions

15
main.go
View File

@ -17,13 +17,14 @@ func main() {
a := app.NewWithID("com.github.howeyc.crocgui") a := app.NewWithID("com.github.howeyc.crocgui")
w := a.NewWindow("croc") w := a.NewWindow("croc")
a.Preferences().StringWithFallback("relay-address", "croc.schollz.com:9009") // Defaults
a.Preferences().StringWithFallback("relay-password", "pass123") a.Preferences().SetString("relay-address", a.Preferences().StringWithFallback("relay-address", "croc.schollz.com:9009"))
a.Preferences().StringWithFallback("relay-ports", "9009,9010,9011,9012,9013") a.Preferences().SetString("relay-password", a.Preferences().StringWithFallback("relay-password", "pass123"))
a.Preferences().BoolWithFallback("disable-local", true) a.Preferences().SetString("relay-ports", a.Preferences().StringWithFallback("relay-ports", "9009,9010,9011,9012,9013"))
a.Preferences().BoolWithFallback("force-local", false) a.Preferences().SetBool("disable-local", a.Preferences().BoolWithFallback("disable-local", true))
a.Preferences().BoolWithFallback("disable-multiplexing", false) a.Preferences().SetBool("force-local", a.Preferences().BoolWithFallback("force-local", false))
a.Preferences().BoolWithFallback("disable-compression", false) a.Preferences().SetBool("disable-multiplexing", a.Preferences().BoolWithFallback("disable-multiplexing", false))
a.Preferences().SetBool("disable-compression", a.Preferences().BoolWithFallback("disable-compression", false))
textlogores := fyne.NewStaticResource("text-logo", textlogobytes) textlogores := fyne.NewStaticResource("text-logo", textlogobytes)
textlogo := canvas.NewImageFromResource(textlogores) textlogo := canvas.NewImageFromResource(textlogores)

View File

@ -1,2 +1,3 @@
- Add license info - Add license info
- Update to show filename for content:// URI on android - Update to show filename for content:// URI on android
- Save defaults on start so settings tab also shows defaults