mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v3 linux] remove unused dialog callbacks
If it turns out these are needed in the future we can add them back in then.
This commit is contained in:
parent
7cfea7c22c
commit
fff266f50d
1 changed files with 0 additions and 43 deletions
|
|
@ -1133,46 +1133,3 @@ func runSaveFileDialog(dialog *SaveFileDialogStruct) (string, error) {
|
|||
|
||||
return results[0], nil
|
||||
}
|
||||
|
||||
//export openFileDialogCallbackEnd
|
||||
func openFileDialogCallbackEnd(cid C.uint) {
|
||||
id := uint(cid)
|
||||
channel, ok := openFileResponses[id]
|
||||
if ok {
|
||||
close(channel)
|
||||
delete(openFileResponses, id)
|
||||
freeDialogID(id)
|
||||
} else {
|
||||
panic("No channel found for open file dialog")
|
||||
}
|
||||
}
|
||||
|
||||
//export openFileDialogCallback
|
||||
func openFileDialogCallback(cid C.uint, cpath *C.char) {
|
||||
path := C.GoString(cpath)
|
||||
id := uint(cid)
|
||||
channel, ok := openFileResponses[id]
|
||||
if ok {
|
||||
channel <- path
|
||||
} else {
|
||||
panic("No channel found for open file dialog")
|
||||
}
|
||||
}
|
||||
|
||||
//export saveFileDialogCallback
|
||||
func saveFileDialogCallback(cid C.uint, cpath *C.char) {
|
||||
// Covert the path to a string
|
||||
path := C.GoString(cpath)
|
||||
id := uint(cid)
|
||||
// put response on channel
|
||||
channel, ok := saveFileResponses[id]
|
||||
if ok {
|
||||
channel <- path
|
||||
close(channel)
|
||||
delete(saveFileResponses, id)
|
||||
freeDialogID(id)
|
||||
|
||||
} else {
|
||||
panic("No channel found for save file dialog")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue