mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 17:39:58 +08:00
[v2/Windows]Set default extension for save file dialog (#3205)
* Set default extension for save file dialog * add change log --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
This commit is contained in:
parent
9ccb17bfd0
commit
3e5df3c7f1
@ -121,6 +121,10 @@ func (f *Frontend) SaveFileDialog(options frontend.SaveDialogOptions) (string, e
|
|||||||
Folder: defaultFolder,
|
Folder: defaultFolder,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(options.Filters) > 0 {
|
||||||
|
config.DefaultExtension = strings.TrimPrefix(strings.Split(options.Filters[0].Pattern, ";")[0], "*")
|
||||||
|
}
|
||||||
|
|
||||||
result, err := f.showCfdDialog(
|
result, err := f.showCfdDialog(
|
||||||
func() (cfd.Dialog, error) {
|
func() (cfd.Dialog, error) {
|
||||||
return cfd.NewSaveFileDialog(config)
|
return cfd.NewSaveFileDialog(config)
|
||||||
|
@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Docs for IsZoomControlEnabled and ZoomFactor. Fixed by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/3137)
|
- Docs for IsZoomControlEnabled and ZoomFactor. Fixed by @leaanthony in [PR](https://github.com/wailsapp/wails/pull/3137)
|
||||||
- Fixed `-compiler` flag for `wails build`, `wails dev` and `wails generate module`. Fixed in [PR](https://github.com/wailsapp/wails/pull/3121) by [@xtrafrancyz](https://github.com/xtrafrancyz)
|
- Fixed `-compiler` flag for `wails build`, `wails dev` and `wails generate module`. Fixed in [PR](https://github.com/wailsapp/wails/pull/3121) by [@xtrafrancyz](https://github.com/xtrafrancyz)
|
||||||
- Fixed uninitialized `SecondInstanceData.WorkingDirectory` on linux and windows ([#3154](https://github.com/wailsapp/wails/pull/3154)).
|
- Fixed uninitialized `SecondInstanceData.WorkingDirectory` on linux and windows ([#3154](https://github.com/wailsapp/wails/pull/3154)).
|
||||||
|
- Fixed save file dialog not appending file extension automatically on Windows by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3205)
|
||||||
|
|
||||||
## v2.7.1 - 2023-12-10
|
## v2.7.1 - 2023-12-10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user