mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-18 09:04:50 -04:00
Improve stability
This commit is contained in:
parent
93e55baa5f
commit
38e6be51c9
3 changed files with 24 additions and 11 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/gotk3/gotk3/glib"
|
||||
"github.com/gotk3/gotk3/gtk"
|
||||
)
|
||||
|
||||
|
@ -35,11 +36,15 @@ func DecryptContents(path string, progress *ProgressWindow, deleteEncryptedConte
|
|||
|
||||
go runDecryption(path, errorChan, deleteEncryptedContents)
|
||||
|
||||
progress.bar.SetText("Decrypting...")
|
||||
glib.IdleAdd(func() {
|
||||
progress.bar.SetText("Decrypting...")
|
||||
})
|
||||
|
||||
for progressInt := range progressChan {
|
||||
if progressInt > 0 {
|
||||
progress.bar.SetFraction(float64(progressInt) / 100)
|
||||
glib.IdleAdd(func() {
|
||||
progress.bar.SetFraction(float64(progressInt) / 100)
|
||||
})
|
||||
for gtk.EventsPending() {
|
||||
gtk.MainIteration()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue