From 794ed8061caa83aa170695bb1c07bdc783dee279 Mon Sep 17 00:00:00 2001 From: mixeme Date: Thu, 18 Jun 2026 22:37:47 +0300 Subject: [PATCH] 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 --- src/gui/app.go | 3 ++- src/{core => platform/desktop}/desktop_linux.go | 2 +- src/{core => platform/desktop}/desktop_other.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename src/{core => platform/desktop}/desktop_linux.go (99%) rename src/{core => platform/desktop}/desktop_other.go (89%) diff --git a/src/gui/app.go b/src/gui/app.go index 41b6cb3..a683b16 100644 --- a/src/gui/app.go +++ b/src/gui/app.go @@ -16,6 +16,7 @@ import ( "gitea.mixdep.ru/mix/gosentry/src/core" "gitea.mixdep.ru/mix/gosentry/src/domain" "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/scheduler" "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 { 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 } events := collectActivity(jobs) diff --git a/src/core/desktop_linux.go b/src/platform/desktop/desktop_linux.go similarity index 99% rename from src/core/desktop_linux.go rename to src/platform/desktop/desktop_linux.go index 4619e5f..ddda38c 100644 --- a/src/core/desktop_linux.go +++ b/src/platform/desktop/desktop_linux.go @@ -1,6 +1,6 @@ //go:build linux -package core +package desktop import ( "fmt" diff --git a/src/core/desktop_other.go b/src/platform/desktop/desktop_other.go similarity index 89% rename from src/core/desktop_other.go rename to src/platform/desktop/desktop_other.go index 8ce6ce5..dc93542 100644 --- a/src/core/desktop_other.go +++ b/src/platform/desktop/desktop_other.go @@ -1,6 +1,6 @@ //go:build !linux -package core +package desktop func InstallDesktopIntegration(appID string, executablePath string, icon []byte) (string, error) { return "", nil