Fix again

This commit is contained in:
Xpl0itU 2023-08-04 15:31:37 +02:00
parent b9fd9fafff
commit 3f72623c03

View file

@ -367,19 +367,13 @@ func (mw *MainWindow) ShowAll() {
if err != nil {
return
}
dialog, err := gtk.FileChooserNativeDialogNew("Select a path to save the games to", mw.window, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, "Select", "Cancel")
selectedPath, err := dialog.Directory().Title("Select a path to save the games to").Browse()
if err != nil {
mw.logger.Fatal("Unable to create dialog:", err)
}
res := dialog.Run()
if res != int(gtk.RESPONSE_ACCEPT) {
if mw.progressWindow.Window.IsVisible() {
mw.progressWindow.Window.Close()
}
return
}
selectedPath := dialog.FileChooser.GetFilename()
mw.progressWindow.Window.ShowAll()
go func() {