stuff
This commit is contained in:
25
main.go
25
main.go
@@ -11,7 +11,6 @@ import (
|
||||
"fyne.io/fyne/v2/app"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/storage"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -84,7 +83,7 @@ func main() {
|
||||
container := container.NewVBox(
|
||||
widget.NewForm(widget.NewFormItem("Profiles Directory", profilesrootentry)),
|
||||
widget.NewButtonWithIcon("Select", theme.FolderIcon(), func() {
|
||||
d := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
@@ -95,19 +94,11 @@ func main() {
|
||||
cfg.ProfilesRoot = lu.Path()
|
||||
saveConfig(*cfg)
|
||||
fillGrid(grid, wp)
|
||||
}, wp)
|
||||
l, err := storage.ListerForURI(storage.NewFileURI("."))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
if l != nil {
|
||||
d.SetLocation(l)
|
||||
}
|
||||
d.Show()
|
||||
}, wp).Show()
|
||||
}),
|
||||
widget.NewForm(widget.NewFormItem("Archive Directory", archiverootentry)),
|
||||
widget.NewButtonWithIcon("Select", theme.FolderIcon(), func() {
|
||||
d := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
@@ -118,15 +109,7 @@ func main() {
|
||||
cfg.ArchiveRoot = lu.Path()
|
||||
saveConfig(*cfg)
|
||||
fillGrid(grid, wp)
|
||||
}, wp)
|
||||
l, err := storage.ListerForURI(storage.NewFileURI("."))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
if l != nil {
|
||||
d.SetLocation(l)
|
||||
}
|
||||
d.Show()
|
||||
}, wp).Show()
|
||||
}),
|
||||
widget.NewSeparator(),
|
||||
widget.NewButton("Reload Profiles", func() {
|
||||
|
||||
Reference in New Issue
Block a user