mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-31 23:38:23 -04:00
Fix decrypt contents menu
This commit is contained in:
parent
47935f3f6a
commit
43c53ff93b
1 changed files with 13 additions and 14 deletions
|
@ -180,8 +180,19 @@ func (mw *MainWindow) ShowAll() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
dialog, err := gtk.FileChooserNativeDialogNew("Select the path to decrypt", mw.window, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, "Select", "Cancel")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal("Unable to create dialog:", err)
|
||||||
|
}
|
||||||
|
res := dialog.Run()
|
||||||
|
if res != int(gtk.RESPONSE_ACCEPT) {
|
||||||
|
mw.progressWindow.Window.Close()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedPath := dialog.FileChooser.GetFilename()
|
||||||
mw.progressWindow.Window.ShowAll()
|
mw.progressWindow.Window.ShowAll()
|
||||||
go mw.onDecryptContentsMenuItemClicked()
|
go mw.onDecryptContentsMenuItemClicked(selectedPath)
|
||||||
})
|
})
|
||||||
toolsSubMenu.Append(decryptContentsMenuItem)
|
toolsSubMenu.Append(decryptContentsMenuItem)
|
||||||
|
|
||||||
|
@ -378,19 +389,7 @@ func (mw *MainWindow) onCategoryToggled(button *gtk.ToggleButton) {
|
||||||
button.Activate()
|
button.Activate()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mw *MainWindow) onDecryptContentsMenuItemClicked() {
|
func (mw *MainWindow) onDecryptContentsMenuItemClicked(selectedPath string) {
|
||||||
dialog, err := gtk.FileChooserNativeDialogNew("Select the path to decrypt", mw.window, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, "Select", "Cancel")
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal("Unable to create dialog:", err)
|
|
||||||
}
|
|
||||||
res := dialog.Run()
|
|
||||||
if res != int(gtk.RESPONSE_ACCEPT) {
|
|
||||||
mw.progressWindow.Window.Close()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
selectedPath := dialog.FileChooser.GetFilename()
|
|
||||||
|
|
||||||
wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
||||||
|
|
||||||
mw.progressWindow.Window.Close()
|
mw.progressWindow.Window.Close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue