diff options
Diffstat (limited to 'lib/isodumper.py')
-rwxr-xr-x | lib/isodumper.py | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py index df67d67..d0d9aa5 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -162,10 +162,8 @@ class IsoDumper(object): self.backup_select.setLabel(tail) self.dialog.recalcLayout() self.backupbt.setEnabled() - #self.backup_select.set_tooltip_text(self.backup_img_name) - self.logger(_('Backup to: ')+ self.backup_img_name) - def do_format(self,format_type,name) : + def do_format(self,format_type,name): target = self.dev.split('(')[1].split(')')[0] info = Info(_("Formatting confirmation"),True,self.warning) if self.ask_YesOrNo(info): @@ -241,9 +239,24 @@ class IsoDumper(object): self.returncode=0 source = self.dev.split('(')[1].split(')')[0] self.logger(_('Backup to:')+' '+dest) - self.raw_write(source, dest, self.deviceSize) - if self.returncode==0: - self.success() + bus = SystemBus() + iface = bus.get("org.mageia.Magiback","Isodumper") + #Writing step + iface.do_write(source, dest, self.deviceSize) + progress = iface.progress + while not iface.done : + progress = iface.progress + self.progress.setValue(progress) + time.sleep(1) + 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.logger(message) + self.success() + else: + self.emergency(message) def do_write(self): self.writebt.setDisabled() @@ -281,7 +294,7 @@ class IsoDumper(object): if success: #Writing step #Dump mode - iface.do_write(source, target) + iface.do_write(source, target, b) progress = iface.progress while not iface.done : progress = iface.progress |