From fb5c63cd299caa23d568289e03a7fb7a7340c99f Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Thu, 11 Dec 2025 06:53:49 -0500 Subject: [PATCH] Fix droppable signature and dependency handling --- internal/ui/components.go | 14 ++++++-------- scripts/build-linux.sh | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/internal/ui/components.go b/internal/ui/components.go index 3436c71..6f44af8 100644 --- a/internal/ui/components.go +++ b/internal/ui/components.go @@ -9,6 +9,7 @@ import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/container" + "fyne.io/fyne/v2/driver/desktop" "fyne.io/fyne/v2/theme" "fyne.io/fyne/v2/widget" "git.leaktechnologies.dev/stu/VideoTools/internal/logging" @@ -288,19 +289,16 @@ func (d *Droppable) CreateRenderer() fyne.WidgetRenderer { } } -// DraggedOver highlights when drag is over (optional) -func (d *Droppable) DraggedOver(pos fyne.Position) { - _ = pos -} +// Dragged satisfies desktop.DropTarget; no-op highlight for now. +func (d *Droppable) Dragged(_ *desktop.DragEvent) {} // DraggedOut clears highlight (optional) func (d *Droppable) DraggedOut() {} // Dropped handles drop events -func (d *Droppable) Dropped(pos fyne.Position, items []fyne.URI) { - _ = pos - if d.onDropped != nil { - d.onDropped(items) +func (d *Droppable) Dropped(ev *desktop.DragEvent) { + if d.onDropped != nil && ev != nil { + d.onDropped(ev.URIs) } } diff --git a/scripts/build-linux.sh b/scripts/build-linux.sh index 0a5ce70..2913485 100755 --- a/scripts/build-linux.sh +++ b/scripts/build-linux.sh @@ -29,17 +29,24 @@ echo "" cd "$PROJECT_ROOT" echo "๐Ÿงน Cleaning previous builds and cache..." -go clean -cache -modcache -testcache 2>/dev/null || true +go clean -cache -testcache 2>/dev/null || true rm -f "$BUILD_OUTPUT" 2>/dev/null || true # Also clear build cache directory to avoid permission issues rm -rf "${GOCACHE:-$HOME/.cache/go-build}" 2>/dev/null || true echo "โœ“ Cache cleaned" echo "" -echo "โฌ‡๏ธ Downloading and verifying dependencies..." -go mod download -go mod verify -echo "โœ“ Dependencies verified" +echo "โฌ‡๏ธ Downloading and verifying dependencies (skips if already cached)..." +if go list -m all >/dev/null 2>&1; then + echo "โœ“ Dependencies already present" +else + if go mod download && go mod verify; then + echo "โœ“ Dependencies downloaded and verified" + else + echo "โŒ Failed to download/verify modules. Check network/GOPROXY or try again." + exit 1 + fi +fi echo "" echo "๐Ÿ”จ Building VideoTools..."