mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-29 14:35:25 -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 {
|
||||
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()
|
||||
go mw.onDecryptContentsMenuItemClicked()
|
||||
go mw.onDecryptContentsMenuItemClicked(selectedPath)
|
||||
})
|
||||
toolsSubMenu.Append(decryptContentsMenuItem)
|
||||
|
||||
|
@ -378,19 +389,7 @@ func (mw *MainWindow) onCategoryToggled(button *gtk.ToggleButton) {
|
|||
button.Activate()
|
||||
}
|
||||
|
||||
func (mw *MainWindow) onDecryptContentsMenuItemClicked() {
|
||||
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()
|
||||
|
||||
func (mw *MainWindow) onDecryptContentsMenuItemClicked(selectedPath string) {
|
||||
wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
||||
|
||||
mw.progressWindow.Window.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue