T1.7: Create src/platform/desktop; move desktop integration

Move desktop_linux.go and desktop_other.go from src/core to the new
src/platform/desktop package. Update src/gui to import and use the
new package location.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
mixeme
2026-06-18 22:37:47 +03:00
parent 16d818d03d
commit 794ed8061c
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -16,6 +16,7 @@ import (
"gitea.mixdep.ru/mix/gosentry/src/core" "gitea.mixdep.ru/mix/gosentry/src/core"
"gitea.mixdep.ru/mix/gosentry/src/domain" "gitea.mixdep.ru/mix/gosentry/src/domain"
"gitea.mixdep.ru/mix/gosentry/src/platform/autostart" "gitea.mixdep.ru/mix/gosentry/src/platform/autostart"
"gitea.mixdep.ru/mix/gosentry/src/platform/desktop"
"gitea.mixdep.ru/mix/gosentry/src/runner" "gitea.mixdep.ru/mix/gosentry/src/runner"
"gitea.mixdep.ru/mix/gosentry/src/scheduler" "gitea.mixdep.ru/mix/gosentry/src/scheduler"
"gitea.mixdep.ru/mix/gosentry/src/storage" "gitea.mixdep.ru/mix/gosentry/src/storage"
@@ -168,7 +169,7 @@ func newMainView(w fyne.Window) (fyne.CanvasObject, func(time.Duration, bool)) {
if err != nil { if err != nil {
return container.NewPadded(widget.NewLabel("Failed to load GoSentry configuration: " + err.Error())), func(time.Duration, bool) {} return container.NewPadded(widget.NewLabel("Failed to load GoSentry configuration: " + err.Error())), func(time.Duration, bool) {}
} }
if iconPath, err := core.InstallDesktopIntegration(appID, store.Paths.ExecutablePath, assets.IconBytes()); err == nil { if iconPath, err := desktop.InstallDesktopIntegration(appID, store.Paths.ExecutablePath, assets.IconBytes()); err == nil {
store.Paths.DesktopIcon = iconPath store.Paths.DesktopIcon = iconPath
} }
events := collectActivity(jobs) events := collectActivity(jobs)
@@ -1,6 +1,6 @@
//go:build linux //go:build linux
package core package desktop
import ( import (
"fmt" "fmt"
@@ -1,6 +1,6 @@
//go:build !linux //go:build !linux
package core package desktop
func InstallDesktopIntegration(appID string, executablePath string, icon []byte) (string, error) { func InstallDesktopIntegration(appID string, executablePath string, icon []byte) (string, error) {
return "", nil return "", nil