From 19f2922366aa7ef940fb59a63a379932784b7d27 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Sat, 20 Dec 2025 14:03:14 -0500 Subject: [PATCH] Add subtitles module placeholder and benchmark UI flag --- internal/modules/handlers.go | 6 ++++++ internal/ui/mainmenu.go | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/internal/modules/handlers.go b/internal/modules/handlers.go index 365a1c3..83ce524 100644 --- a/internal/modules/handlers.go +++ b/internal/modules/handlers.go @@ -44,6 +44,12 @@ func HandleAudio(files []string) { fmt.Println("audio", files) } +// HandleSubtitles handles the subtitles module (placeholder) +func HandleSubtitles(files []string) { + logging.Debug(logging.CatModule, "subtitles handler invoked with %v", files) + fmt.Println("subtitles", files) +} + // HandleThumb handles the thumb module func HandleThumb(files []string) { logging.Debug(logging.CatModule, "thumb handler invoked with %v", files) diff --git a/internal/ui/mainmenu.go b/internal/ui/mainmenu.go index 38be4f7..6d18a2a 100644 --- a/internal/ui/mainmenu.go +++ b/internal/ui/mainmenu.go @@ -44,7 +44,7 @@ type HistoryEntry struct { } // BuildMainMenu creates the main menu view with module tiles grouped by category -func BuildMainMenu(modules []ModuleInfo, onModuleClick func(string), onModuleDrop func(string, []fyne.URI), onQueueClick func(), onLogsClick func(), onBenchmarkClick func(), onBenchmarkHistoryClick func(), onToggleSidebar func(), sidebarVisible bool, sidebar fyne.CanvasObject, titleColor, queueColor, textColor color.Color, queueCompleted, queueTotal int) fyne.CanvasObject { +func BuildMainMenu(modules []ModuleInfo, onModuleClick func(string), onModuleDrop func(string, []fyne.URI), onQueueClick func(), onLogsClick func(), onBenchmarkClick func(), onBenchmarkHistoryClick func(), onToggleSidebar func(), sidebarVisible bool, sidebar fyne.CanvasObject, titleColor, queueColor, textColor color.Color, queueCompleted, queueTotal int, hasBenchmark bool) fyne.CanvasObject { title := canvas.NewText("VIDEOTOOLS", titleColor) title.TextStyle = fyne.TextStyle{Monospace: true, Bold: true} title.TextSize = 28 @@ -55,7 +55,12 @@ func BuildMainMenu(modules []ModuleInfo, onModuleClick func(string), onModuleDro sidebarToggleBtn.Importance = widget.LowImportance benchmarkBtn := widget.NewButton("Run Benchmark", onBenchmarkClick) - benchmarkBtn.Importance = widget.LowImportance + // Highlight the benchmark button if no benchmark has been run + if !hasBenchmark { + benchmarkBtn.Importance = widget.HighImportance + } else { + benchmarkBtn.Importance = widget.LowImportance + } viewResultsBtn := widget.NewButton("View Results", onBenchmarkHistoryClick) viewResultsBtn.Importance = widget.LowImportance