Skip to content

Commit

Permalink
improve files app
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jul 20, 2024
1 parent bae966d commit 3cea613
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ import (
func main() {
b := core.NewBody("Cogent Files")

fv := core.NewFilePicker(b)
fv.Scene.OnKeyChord(func(e events.Event) {
fp := core.NewFilePicker(b)
fp.Scene.OnKeyChord(func(e events.Event) {
if keymap.Of(e.KeyChord()) == keymap.Accept {
core.TheApp.OpenURL("file://" + fv.SelectedFile())
core.TheApp.OpenURL("file://" + fp.SelectedFile())
}
})
b.AddAppBar(fp.MakeToolbar)

b.RunMainWindow()
}

0 comments on commit 3cea613

Please sign in to comment.