mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-16 08:59:29 +08:00
[windows] Temporarily use common-dialog fork
This commit is contained in:
parent
5e51f426fa
commit
c53d44b3ec
@ -7,12 +7,12 @@ require (
|
||||
github.com/fatih/structtag v1.2.0
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/gorilla/websocket v1.4.1
|
||||
github.com/harry1453/go-common-file-dialog v1.0.0
|
||||
github.com/imdario/mergo v0.3.11
|
||||
github.com/jackmordaunt/icns v1.0.0
|
||||
github.com/leaanthony/clir v1.0.4
|
||||
github.com/leaanthony/debme v1.2.1
|
||||
github.com/leaanthony/go-ansi-parser v1.0.1
|
||||
github.com/leaanthony/go-common-file-dialog v1.0.2
|
||||
github.com/leaanthony/gosod v1.0.1
|
||||
github.com/leaanthony/slicer v1.5.0
|
||||
github.com/leaanthony/webview2runtime v1.1.0
|
||||
|
@ -35,8 +35,6 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/harry1453/go-common-file-dialog v1.0.0 h1:fzBAGhRTqWQyJw5xkm0PSsA+d3CBYBrfh+Nayb6U0nM=
|
||||
github.com/harry1453/go-common-file-dialog v1.0.0/go.mod h1:3zwmbo7fy+uYGyaec74mu+Z9DPg0aEt10fSjjPwfyiY=
|
||||
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
|
||||
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
|
||||
github.com/jackmordaunt/icns v1.0.0 h1:RYSxplerf/l/DUd09AHtITwckkv/mqjVv4DjYdPmAMQ=
|
||||
@ -52,6 +50,8 @@ github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oO
|
||||
github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
|
||||
github.com/leaanthony/go-ansi-parser v1.0.1 h1:97v6c5kYppVsbScf4r/VZdXyQ21KQIfeQOk2DgKxGG4=
|
||||
github.com/leaanthony/go-ansi-parser v1.0.1/go.mod h1:7arTzgVI47srICYhvgUV4CGd063sGEeoSlych5yeSPM=
|
||||
github.com/leaanthony/go-common-file-dialog v1.0.2 h1:uJ2zXCxP4GwbpR/k/y6unuNbSJn3WTjt4rvHolX3Eys=
|
||||
github.com/leaanthony/go-common-file-dialog v1.0.2/go.mod h1:TGhEc9eSJgRsupZ+iH1ZgAOnEo9zp05cRH2j08RPrF0=
|
||||
github.com/leaanthony/gosod v1.0.1 h1:F+4c3DmEBfigi7oAswCV2RpQ+k4DcNbhuCZUGdBHacQ=
|
||||
github.com/leaanthony/gosod v1.0.1/go.mod h1:W8RyeSFBXu7RpIxPGEJfW4moSyGGEjlJMLV25wEbAdU=
|
||||
github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=
|
||||
|
@ -9,7 +9,7 @@ import "C"
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/harry1453/go-common-file-dialog/cfd"
|
||||
"github.com/leaanthony/go-common-file-dialog/cfd"
|
||||
"golang.org/x/sys/windows"
|
||||
"log"
|
||||
"strconv"
|
||||
@ -154,7 +154,7 @@ func (c *Client) OpenFileDialog(options *dialog.OpenDialog, callbackID string) {
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
//thisdialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
thisdialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
defer func(thisdialog cfd.OpenFileDialog) {
|
||||
err := thisdialog.Release()
|
||||
if err != nil {
|
||||
@ -185,7 +185,7 @@ func (c *Client) OpenDirectoryDialog(dialogOptions *dialog.OpenDialog, callbackI
|
||||
if err != nil {
|
||||
log.Fatal()
|
||||
}
|
||||
//thisDialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
thisDialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
defer func(thisDialog cfd.SelectFolderDialog) {
|
||||
err := thisDialog.Release()
|
||||
if err != nil {
|
||||
@ -213,7 +213,7 @@ func (c *Client) OpenMultipleFilesDialog(dialogOptions *dialog.OpenDialog, callb
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
//thisdialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
thisdialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
defer func(thisdialog cfd.OpenMultipleFilesDialog) {
|
||||
err := thisdialog.Release()
|
||||
if err != nil {
|
||||
@ -243,7 +243,7 @@ func (c *Client) SaveDialog(dialogOptions *dialog.SaveDialog, callbackID string)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
//saveDialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
saveDialog.SetParentWindowHandle(uintptr(C.GetWindowHandle(c.app.app)))
|
||||
err = saveDialog.Show()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Loading…
Reference in New Issue
Block a user