From fff266f50d453ce092234b0b79d6a30715165195 Mon Sep 17 00:00:00 2001 From: Travis McLane Date: Wed, 13 Sep 2023 13:11:03 -0500 Subject: [PATCH] [v3 linux] remove unused dialog callbacks If it turns out these are needed in the future we can add them back in then. --- v3/pkg/application/linux_cgo.go | 43 --------------------------------- 1 file changed, 43 deletions(-) diff --git a/v3/pkg/application/linux_cgo.go b/v3/pkg/application/linux_cgo.go index 6e262765..17c83684 100644 --- a/v3/pkg/application/linux_cgo.go +++ b/v3/pkg/application/linux_cgo.go @@ -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") - } -}