mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Use options struct for dialogs
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/wailsapp/wails/v2/internal/logger"
|
||||
"github.com/wailsapp/wails/v2/pkg/options"
|
||||
)
|
||||
|
||||
// Client is our implentation of messageDispatcher.Client
|
||||
@@ -123,11 +124,11 @@ func (c *Client) WindowSetColour(colour int) {
|
||||
}
|
||||
|
||||
// OpenDialog will open a dialog with the given title and filter
|
||||
func (c *Client) OpenDialog(title string, filter string) []string {
|
||||
func (c *Client) OpenDialog(dialogOptions *options.OpenDialog) []string {
|
||||
|
||||
var result []string
|
||||
|
||||
cstring := C.OpenDialog(c.app.app, c.app.string2CString(title), c.app.string2CString(filter))
|
||||
cstring := C.OpenDialog(c.app.app, c.app.string2CString(dialogOptions.Title), c.app.string2CString(dialogOptions.Filter))
|
||||
if cstring == nil {
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user