Add drag-and-drop support for single file selection
Implemented functionality to handle single file drag-and-drop in the UI, including error handling for multiple files and directories. Updated localization files to support new messages related to drag-and-drop usage and errors.
This commit is contained in:
@@ -12,6 +12,7 @@ type WindowContract interface {
|
||||
SetMainMenu(menu *fyne.MainMenu)
|
||||
NewFileOpen(callback func(fyne.URIReadCloser, error), location fyne.ListableURI) *dialog.FileDialog
|
||||
NewFolderOpen(callback func(fyne.ListableURI, error), location fyne.ListableURI) *dialog.FileDialog
|
||||
SetOnDropped(callback func(position fyne.Position, uris []fyne.URI))
|
||||
ShowAndRun()
|
||||
GetLayout() LayoutContract
|
||||
}
|
||||
@@ -80,3 +81,7 @@ func (w Window) ShowAndRun() {
|
||||
func (w Window) GetLayout() LayoutContract {
|
||||
return w.layout
|
||||
}
|
||||
|
||||
func (w Window) SetOnDropped(callback func(position fyne.Position, uris []fyne.URI)) {
|
||||
w.windowFyne.SetOnDropped(callback)
|
||||
}
|
||||
|
Reference in New Issue
Block a user