From 72ac44b0797f74c97c99a4c570903be0e913ce8a Mon Sep 17 00:00:00 2001 From: sewn Date: Tue, 30 Jan 2024 21:38:16 +0300 Subject: [PATCH] splash: move used xdgopen func internal --- splash/dialog.go | 2 +- splash/splash.go | 3 +-- {util => splash}/xdg.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename {util => splash}/xdg.go (94%) diff --git a/splash/dialog.go b/splash/dialog.go index aaf669e4..21bd958a 100644 --- a/splash/dialog.go +++ b/splash/dialog.go @@ -43,7 +43,7 @@ func (ui *Splash) Dialog(txt string, user bool) (r bool) { Ops: &ops, Constraints: layout.Constraints{ Min: image.Point{X: 64, Y: 38}, - Max: image.Point{X: width, Y: width*2}, + Max: image.Point{X: width, Y: width * 2}, }, } defer ops.Reset() diff --git a/splash/splash.go b/splash/splash.go index 23b23b46..f25d2b0a 100644 --- a/splash/splash.go +++ b/splash/splash.go @@ -21,7 +21,6 @@ import ( "gioui.org/unit" "gioui.org/widget" "gioui.org/widget/material" - "github.com/vinegarhq/vinegar/util" ) //go:embed vinegar.png @@ -187,7 +186,7 @@ func (ui *Splash) Run() error { if ui.openLogButton.Clicked(gtx) { log.Printf("Opening log file: %s", ui.LogPath) - err := util.XDGOpen(ui.LogPath).Start() + err := XDGOpen(ui.LogPath).Start() if err != nil { return err } diff --git a/util/xdg.go b/splash/xdg.go similarity index 94% rename from util/xdg.go rename to splash/xdg.go index 24b360ed..9b70fea6 100644 --- a/util/xdg.go +++ b/splash/xdg.go @@ -1,4 +1,4 @@ -package util +package splash import ( "os"