Closed Octavelscx closed 1 month ago
in pkg/gui/drag_and_drop.go i'm checking if the extension is conform, the conform extension is defined in config/config.go the idea is to transform the FILE_EXT string constant into a string array, and fill it with more possible extensions. You'll need to adapt the drag_and_drop.go file, to check every possible extensions.
if strings.ToLower(filepath.Ext(filename)) == config.FILE_EXT {
// Update the label with the filename
label.SetText(filepath.Base(filename))
// Update the XlsmFiles slice
switch boxIdx {
case 1:
core.XlsmFiles[0].Path = filename
case 2:
core.XlsmFiles[1].Path = filename
}
// Reset the button label.
button.SetLabel(config.INIT_BUTTON_LABEL)
} else {
// If not an .xlsm file, update the label with an error message
label.SetText(config.WRONG_EXT_MSG)
}
why not :)