mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-06-08 10:32:26 -04:00
Handle error on decryption when it's menu option
This commit is contained in:
parent
771ed1f7cc
commit
7d0c7be191
1 changed files with 11 additions and 3 deletions
|
@ -192,7 +192,14 @@ func (mw *MainWindow) ShowAll() {
|
||||||
|
|
||||||
selectedPath := dialog.FileChooser.GetFilename()
|
selectedPath := dialog.FileChooser.GetFilename()
|
||||||
mw.progressWindow.Window.ShowAll()
|
mw.progressWindow.Window.ShowAll()
|
||||||
go mw.onDecryptContentsMenuItemClicked(selectedPath)
|
go func() {
|
||||||
|
err := mw.onDecryptContentsMenuItemClicked(selectedPath)
|
||||||
|
if err != nil {
|
||||||
|
glib.IdleAdd(func() {
|
||||||
|
mw.showError(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}()
|
||||||
})
|
})
|
||||||
toolsSubMenu.Append(decryptContentsMenuItem)
|
toolsSubMenu.Append(decryptContentsMenuItem)
|
||||||
|
|
||||||
|
@ -389,10 +396,11 @@ func (mw *MainWindow) onCategoryToggled(button *gtk.ToggleButton) {
|
||||||
button.Activate()
|
button.Activate()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mw *MainWindow) onDecryptContentsMenuItemClicked(selectedPath string) {
|
func (mw *MainWindow) onDecryptContentsMenuItemClicked(selectedPath string) error {
|
||||||
wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
err := wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
||||||
|
|
||||||
mw.progressWindow.Window.Close()
|
mw.progressWindow.Window.Close()
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mw *MainWindow) isSelectionInQueue() bool {
|
func (mw *MainWindow) isSelectionInQueue() bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue