aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2019-02-06 09:04:35 +0100
committerPapoteur <papoteur@mageia.org>2019-02-06 09:04:35 +0100
commit441de6c9d4ac86a099b40fd9e8e9ece68556a488 (patch)
tree638927c3233bed5ad7237ec0079797f00e6e430f /lib
parenta834ffb41c19573d16a8b5284451ce0de909a7e0 (diff)
downloadisodumper-441de6c9d4ac86a099b40fd9e8e9ece68556a488.tar
isodumper-441de6c9d4ac86a099b40fd9e8e9ece68556a488.tar.gz
isodumper-441de6c9d4ac86a099b40fd9e8e9ece68556a488.tar.bz2
isodumper-441de6c9d4ac86a099b40fd9e8e9ece68556a488.tar.xz
isodumper-441de6c9d4ac86a099b40fd9e8e9ece68556a488.zip
Manage redraw during writing for GTK (mga#24273)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/isodumper.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index e532e2e..c2744ad 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -250,12 +250,14 @@ class IsoDumper(object):
while not iface.done :
progress = iface.progress
self.progress.setValue(progress)
- time.sleep(1)
+ self.dialog.pollEvent()
+ time.sleep(.2)
success, message = iface.end()
if success:
self.logger(_('{source} successfully written to {target}').format( source=source.split('/')[-1], target=dest))
self.progress.setEnabled()
self.progress.setValue(100)
+ self.dialog.pollEvent()
self.logger(message)
self.success()
else:
@@ -302,23 +304,27 @@ class IsoDumper(object):
while not iface.done :
progress = iface.progress
self.progress.setValue(progress)
- time.sleep(1)
+ self.dialog.pollEvent()
+ time.sleep(.5)
success, message = iface.end()
if success:
self.logger(_('Image {source} successfully written to {target}').format( source=source.split('/')[-1], target=target))
self.logger(_('Bytes written: ')+str(b))
self.progress.setLabel(_('Checking ')+target.split('/')[-1])
- self.progress.setValue(0)
+ self.progress.setValue(0)
+ self.dialog.pollEvent()
# Checking
iface.check_write(target, source)
progress = iface.progress
while progress < 100 :
progress = iface.progress
self.progress.setValue(progress)
- time.sleep(1)
+ self.dialog.pollEvent()
+ time.sleep(.5)
success, message = iface.end()
self.progress.setEnabled()
self.progress.setValue(100)
+ self.dialog.pollEvent()
self.logger(message)
# Add persistent partition if asked
if self.persistencecb.value():