mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-31 15:28:22 -04:00
Try to fix crashing issues
This commit is contained in:
parent
7f96e5d861
commit
1ddcf5f645
3 changed files with 11 additions and 6 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"sync"
|
||||
|
||||
wiiudownloader "github.com/Xpl0itU/WiiUDownloader"
|
||||
"github.com/Xpl0itU/dialog"
|
||||
"github.com/cavaliergopher/grab/v3"
|
||||
"github.com/gotk3/gotk3/glib"
|
||||
"github.com/gotk3/gotk3/gtk"
|
||||
|
@ -206,19 +207,14 @@ func (mw *MainWindow) ShowAll() {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
dialog, err := gtk.FileChooserNativeDialogNew("Select the path to decrypt", 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() {
|
||||
err := mw.onDecryptContentsMenuItemClicked(selectedPath)
|
||||
|
|
5
go.mod
5
go.mod
|
@ -7,4 +7,9 @@ require (
|
|||
github.com/dustin/go-humanize v1.0.1
|
||||
github.com/gotk3/gotk3 v0.6.2
|
||||
golang.org/x/crypto v0.11.0
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230804131525-853ec517fc9e
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d // indirect
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,3 +1,7 @@
|
|||
github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d h1:2xp1BQbqcDDaikHnASWpVZRjibOxu7y9LhAv04whugI=
|
||||
github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d/go.mod h1:peYoMncQljjNS6tZwI9WVyQB3qZS6u79/N3mBOcnd3I=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230804131525-853ec517fc9e h1:zpJDdKsYMBlG//WaNUfJqUzfZJ+Z/RrHdLXr6EP08rs=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230804131525-853ec517fc9e/go.mod h1:Yl652wzqaetwEMJ8FnDRKBK1+CisE+PU5BGJXItbYFg=
|
||||
github.com/cavaliergopher/grab/v3 v3.0.1 h1:4z7TkBfmPjmLAAmkkAZNX/6QJ1nNFdv3SdIHXju0Fr4=
|
||||
github.com/cavaliergopher/grab/v3 v3.0.1/go.mod h1:1U/KNnD+Ft6JJiYoYBAimKH2XrYptb8Kl3DFGmsjpq4=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue