[v3/Windows] Fix failing Windows build due to undefined options (#3208)

* Fix failing Windows build due to undefined options

* Update changelog
This commit is contained in:
Thomas Sénéchal 2024-01-17 19:33:51 +01:00 committed by GitHub
commit 23c1a7d1d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix dpi scaling on start up (windows). Changed by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/3145)
- Fix replace line in `go.mod` to use relative paths. Fixes Windows paths with spaces - @leaanthony.
- Fix MacOS systray click handling when no attached window by [thomas-senechal](https://github.com/thomas-senechal) in PR [#3207](https://github.com/wailsapp/wails/pull/3207)
- Fix failing Windows build due to unknown option by [thomas-senechal](https://github.com/thomas-senechal) in PR [#3208](https://github.com/wailsapp/wails/pull/3208)
### Changed

View file

@ -3,11 +3,12 @@
package application
import (
"path/filepath"
"strings"
"github.com/wailsapp/wails/v3/internal/go-common-file-dialog/cfd"
"github.com/wailsapp/wails/v3/pkg/w32"
"golang.org/x/sys/windows"
"path/filepath"
"strings"
)
func (m *windowsApp) showAboutDialog(title string, message string, _ []byte) {
@ -169,8 +170,8 @@ func (m *windowSaveFileDialog) show() (chan string, error) {
}
// Original PR for v2 by @almas1992: https://github.com/wailsapp/wails/pull/3205
if len(options.Filters) > 0 {
config.DefaultExtension = strings.TrimPrefix(strings.Split(options.Filters[0].Pattern, ";")[0], "*")
if len(m.dialog.filters) > 0 {
config.DefaultExtension = strings.TrimPrefix(strings.Split(m.dialog.filters[0].Pattern, ";")[0], "*")
}
result, err := showCfdDialog(