5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 20:51:38 +08:00

implement SaveFileDialog

This commit is contained in:
Travis McLane 2022-01-21 10:20:59 -06:00
parent 2c2e053bd1
commit d0feeb938c

View File

@ -47,7 +47,12 @@ func (f *Frontend) OpenDirectoryDialog(dialogOptions frontend.OpenDialogOptions)
}
func (f *Frontend) SaveFileDialog(dialogOptions frontend.SaveDialogOptions) (string, error) {
panic("implement me")
f.mainWindow.OpenFileDialog(dialogOptions, 0, GTK_FILE_CHOOSER_ACTION_SAVE)
results := <-openFileResults
if len(results) == 1 {
return results[0], nil
}
return "", nil
}
func (f *Frontend) MessageDialog(dialogOptions frontend.MessageDialogOptions) (string, error) {