mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3] Add window attachment for open/save dialogs. Fix filter bug.
This commit is contained in:
@@ -54,7 +54,7 @@ func (m *MessageProcessor) processDialogMethod(method string, rw http.ResponseWr
|
||||
case "Question":
|
||||
dialog = globalApplication.QuestionDialog()
|
||||
}
|
||||
var detached = params.Bool("Detached")
|
||||
var detached = args.Bool("Detached")
|
||||
if detached == nil || !*detached {
|
||||
dialog.AttachToWindow(window)
|
||||
}
|
||||
@@ -77,6 +77,10 @@ func (m *MessageProcessor) processDialogMethod(method string, rw http.ResponseWr
|
||||
m.httpError(rw, "Error parsing dialog options: %s", err.Error())
|
||||
return
|
||||
}
|
||||
var detached = args.Bool("Detached")
|
||||
if detached == nil || !*detached {
|
||||
options.Window = window
|
||||
}
|
||||
dialog := globalApplication.OpenFileDialogWithOptions(&options)
|
||||
|
||||
go func() {
|
||||
@@ -110,6 +114,10 @@ func (m *MessageProcessor) processDialogMethod(method string, rw http.ResponseWr
|
||||
m.httpError(rw, "Error parsing dialog options: %s", err.Error())
|
||||
return
|
||||
}
|
||||
var detached = args.Bool("Detached")
|
||||
if detached == nil || !*detached {
|
||||
options.Window = window
|
||||
}
|
||||
dialog := globalApplication.SaveFileDialogWithOptions(&options)
|
||||
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user