VideoTools/vendor/fyne.io/fyne/v2/dialog/folder.go
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00

43 lines
1.2 KiB
Go

package dialog
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/storage"
)
var folderFilter = storage.NewMimeTypeFileFilter([]string{"application/x-directory"})
// NewFolderOpen creates a file dialog allowing the user to choose a folder to
// open. The callback function will run when the dialog closes. The URI will be
// nil when the user cancels or when nothing is selected.
//
// The dialog will appear over the window specified when Show() is called.
//
// Since: 1.4
func NewFolderOpen(callback func(fyne.ListableURI, error), parent fyne.Window) *FileDialog {
dialog := &FileDialog{}
dialog.callback = callback
dialog.parent = parent
dialog.filter = folderFilter
return dialog
}
// ShowFolderOpen creates and shows a file dialog allowing the user to choose a
// folder to open. The callback function will run when the dialog closes. The
// URI will be nil when the user cancels or when nothing is selected.
//
// The dialog will appear over the window specified.
//
// Since: 1.4
func ShowFolderOpen(callback func(fyne.ListableURI, error), parent fyne.Window) {
dialog := NewFolderOpen(callback, parent)
if fileOpenOSOverride(dialog) {
return
}
dialog.Show()
}
func (f *FileDialog) isDirectory() bool {
return f.filter == folderFilter
}