From 3cea61321b59001916f8f40289f4befae30215de Mon Sep 17 00:00:00 2001 From: Kai O'Reilly Date: Sat, 20 Jul 2024 16:06:16 -0700 Subject: [PATCH] improve files app --- files/files.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/files/files.go b/files/files.go index 8a5dfbe4..29ca147a 100644 --- a/files/files.go +++ b/files/files.go @@ -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() }