mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-31 07:18:25 -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()
|
||||
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)
|
||||
|
||||
|
@ -389,10 +396,11 @@ func (mw *MainWindow) onCategoryToggled(button *gtk.ToggleButton) {
|
|||
button.Activate()
|
||||
}
|
||||
|
||||
func (mw *MainWindow) onDecryptContentsMenuItemClicked(selectedPath string) {
|
||||
wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
||||
func (mw *MainWindow) onDecryptContentsMenuItemClicked(selectedPath string) error {
|
||||
err := wiiudownloader.DecryptContents(selectedPath, &mw.progressWindow, false)
|
||||
|
||||
mw.progressWindow.Window.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
func (mw *MainWindow) isSelectionInQueue() bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue