|
|
|
@@ -13,7 +13,7 @@ import (
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/assets"
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/src/core"
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/src/app"
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/src/domain"
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/src/platform/autostart"
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/src/platform/desktop"
|
|
|
|
@@ -22,10 +22,10 @@ import (
|
|
|
|
|
"gitea.mixdep.ru/mix/gosentry/src/storage"
|
|
|
|
|
|
|
|
|
|
"fyne.io/fyne/v2"
|
|
|
|
|
"fyne.io/fyne/v2/app"
|
|
|
|
|
fyneapp "fyne.io/fyne/v2/app"
|
|
|
|
|
"fyne.io/fyne/v2/container"
|
|
|
|
|
"fyne.io/fyne/v2/dialog"
|
|
|
|
|
"fyne.io/fyne/v2/driver/desktop"
|
|
|
|
|
fynedesktop "fyne.io/fyne/v2/driver/desktop"
|
|
|
|
|
"fyne.io/fyne/v2/layout"
|
|
|
|
|
"fyne.io/fyne/v2/theme"
|
|
|
|
|
"fyne.io/fyne/v2/widget"
|
|
|
|
@@ -60,10 +60,10 @@ func Run(startInTray bool) {
|
|
|
|
|
|
|
|
|
|
// A stable app ID lets Fyne persist desktop preferences consistently across
|
|
|
|
|
// launches and gives tray/window integration a predictable identity.
|
|
|
|
|
a := app.NewWithID(appID)
|
|
|
|
|
a := fyneapp.NewWithID(appID)
|
|
|
|
|
a.SetIcon(loadAppIcon())
|
|
|
|
|
|
|
|
|
|
w := a.NewWindow("GoSentry " + core.Version)
|
|
|
|
|
w := a.NewWindow("GoSentry " + app.Version)
|
|
|
|
|
configureSystemTray(a, w)
|
|
|
|
|
w.Resize(fyne.NewSize(1120, 720))
|
|
|
|
|
content, recordStartup := newMainView(w)
|
|
|
|
@@ -91,7 +91,7 @@ func loadAppIcon() fyne.Resource {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func configureSystemTray(a fyne.App, w fyne.Window) {
|
|
|
|
|
desk, ok := a.(desktop.App)
|
|
|
|
|
desk, ok := a.(fynedesktop.App)
|
|
|
|
|
if !ok {
|
|
|
|
|
// Not every Fyne driver exposes desktop tray features. Returning silently
|
|
|
|
|
// keeps the same binary usable on platforms or sessions without a tray.
|
|
|
|
@@ -1015,7 +1015,7 @@ func settingsView(w fyne.Window, store *storage.Store, jobs *[]job) fyne.CanvasO
|
|
|
|
|
settingsStatus,
|
|
|
|
|
widget.NewSeparator(),
|
|
|
|
|
widget.NewLabelWithStyle("About", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
|
|
|
|
settingsRow("GoSentry", widget.NewLabel(core.Version)),
|
|
|
|
|
settingsRow("GoSentry", widget.NewLabel(app.Version)),
|
|
|
|
|
settingsRow("Go", widget.NewLabel(runtime.Version())),
|
|
|
|
|
settingsRow("Fyne", widget.NewLabel(fyneVersion())),
|
|
|
|
|
settingsRow("Repository", widget.NewHyperlink(projectRepositoryURL, mustParseURL(projectRepositoryURL))),
|
|
|
|
|