mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-30 23:15:18 -04:00
Fix title.tmd selection
This commit is contained in:
parent
3f72623c03
commit
b8a397cc6c
3 changed files with 17 additions and 19 deletions
|
@ -207,7 +207,7 @@ func (mw *MainWindow) ShowAll() {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
selectedPath, err := dialog.Directory().Title("Select a path to save the games to").Browse()
|
||||
selectedPath, err := dialog.Directory().Title("Select the game path").Browse()
|
||||
if err != nil {
|
||||
if mw.progressWindow.Window.IsVisible() {
|
||||
mw.progressWindow.Window.Close()
|
||||
|
@ -232,22 +232,10 @@ func (mw *MainWindow) ShowAll() {
|
|||
mw.logger.Fatal("Unable to create menu item:", err)
|
||||
}
|
||||
generateFakeTicketCert.Connect("activate", func() {
|
||||
dialog, err := gtk.FileChooserNativeDialogNew("Select the game's title.tmd", mw.window, gtk.FILE_CHOOSER_ACTION_OPEN, "Select", "Cancel")
|
||||
if err != nil {
|
||||
mw.logger.Fatal("Unable to create dialog:", err)
|
||||
}
|
||||
tmdFilter, err := gtk.FileFilterNew()
|
||||
tmdPath, err := dialog.File().Title("Select the game's tmd file").Filter("tmd", "tmd").Load()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
tmdFilter.AddPattern("*.tmd")
|
||||
dialog.AddFilter(tmdFilter)
|
||||
res := dialog.Run()
|
||||
if res != int(gtk.RESPONSE_ACCEPT) {
|
||||
return
|
||||
}
|
||||
|
||||
tmdPath := dialog.FileChooser.GetFilename()
|
||||
parentDir := filepath.Dir(tmdPath)
|
||||
tmdData, err := os.ReadFile(tmdPath)
|
||||
if err != nil {
|
||||
|
|
8
go.mod
8
go.mod
|
@ -3,13 +3,11 @@ module github.com/Xpl0itU/WiiUDownloader
|
|||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805114139-ec888310aded
|
||||
github.com/cavaliergopher/grab/v3 v3.0.1
|
||||
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
|
||||
golang.org/x/crypto v0.12.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d // indirect
|
||||
)
|
||||
require github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d // indirect
|
||||
|
|
12
go.sum
12
go.sum
|
@ -2,6 +2,16 @@ github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d h1:2xp1BQbqcDDaik
|
|||
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/Xpl0itU/dialog v0.0.0-20230805102228-30daaf63bcbd h1:51IwWGC6W/MagDvHOsGi/5AVIFzPuNNYV9sivXYuAVY=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805102228-30daaf63bcbd/go.mod h1:Yl652wzqaetwEMJ8FnDRKBK1+CisE+PU5BGJXItbYFg=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805102943-2718c93a73e6 h1:8jTPVFWj8zMEJYk6fxd5L/4ZVwKjFieGinXkc8TVeaM=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805102943-2718c93a73e6/go.mod h1:Yl652wzqaetwEMJ8FnDRKBK1+CisE+PU5BGJXItbYFg=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805103849-300dbdc97a5f h1:KCjsm0cHmKejbSwK7zKIEictxAa8Px5BYhLTT3NNkuo=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805103849-300dbdc97a5f/go.mod h1:Yl652wzqaetwEMJ8FnDRKBK1+CisE+PU5BGJXItbYFg=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805104205-a680b4ba2941 h1:OXdC6oVVvS2e7fA9ogXeG9a4uUOdSewMVOAFeHfAul4=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805104205-a680b4ba2941/go.mod h1:Yl652wzqaetwEMJ8FnDRKBK1+CisE+PU5BGJXItbYFg=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805114139-ec888310aded h1:GkBw5aNvID1+SKAD3xC5fU4EwMgOmkrvICy5NX3Rqvw=
|
||||
github.com/Xpl0itU/dialog v0.0.0-20230805114139-ec888310aded/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=
|
||||
|
@ -10,3 +20,5 @@ github.com/gotk3/gotk3 v0.6.2 h1:sx/PjaKfKULJPTPq8p2kn2ZbcNFxpOJqi4VLzMbEOO8=
|
|||
github.com/gotk3/gotk3 v0.6.2/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q=
|
||||
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue