Fix droppable signature and dependency handling

This commit is contained in:
Stu Leak 2025-12-11 06:53:49 -05:00
parent c0081e3693
commit fb5c63cd29
2 changed files with 18 additions and 13 deletions

View File

@ -9,6 +9,7 @@ import (
"fyne.io/fyne/v2" "fyne.io/fyne/v2"
"fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container" "fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/driver/desktop"
"fyne.io/fyne/v2/theme" "fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget" "fyne.io/fyne/v2/widget"
"git.leaktechnologies.dev/stu/VideoTools/internal/logging" "git.leaktechnologies.dev/stu/VideoTools/internal/logging"
@ -288,19 +289,16 @@ func (d *Droppable) CreateRenderer() fyne.WidgetRenderer {
} }
} }
// DraggedOver highlights when drag is over (optional) // Dragged satisfies desktop.DropTarget; no-op highlight for now.
func (d *Droppable) DraggedOver(pos fyne.Position) { func (d *Droppable) Dragged(_ *desktop.DragEvent) {}
_ = pos
}
// DraggedOut clears highlight (optional) // DraggedOut clears highlight (optional)
func (d *Droppable) DraggedOut() {} func (d *Droppable) DraggedOut() {}
// Dropped handles drop events // Dropped handles drop events
func (d *Droppable) Dropped(pos fyne.Position, items []fyne.URI) { func (d *Droppable) Dropped(ev *desktop.DragEvent) {
_ = pos if d.onDropped != nil && ev != nil {
if d.onDropped != nil { d.onDropped(ev.URIs)
d.onDropped(items)
} }
} }

View File

@ -29,17 +29,24 @@ echo ""
cd "$PROJECT_ROOT" cd "$PROJECT_ROOT"
echo "🧹 Cleaning previous builds and cache..." 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 rm -f "$BUILD_OUTPUT" 2>/dev/null || true
# Also clear build cache directory to avoid permission issues # Also clear build cache directory to avoid permission issues
rm -rf "${GOCACHE:-$HOME/.cache/go-build}" 2>/dev/null || true rm -rf "${GOCACHE:-$HOME/.cache/go-build}" 2>/dev/null || true
echo "✓ Cache cleaned" echo "✓ Cache cleaned"
echo "" echo ""
echo "⬇️ Downloading and verifying dependencies..." echo "⬇️ Downloading and verifying dependencies (skips if already cached)..."
go mod download if go list -m all >/dev/null 2>&1; then
go mod verify echo "✓ Dependencies already present"
echo "✓ Dependencies verified" 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 ""
echo "🔨 Building VideoTools..." echo "🔨 Building VideoTools..."