mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07: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:
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user