Skip to content

Commit

Permalink
[tbehan] Write percentage of completion in progressbar
Browse files Browse the repository at this point in the history
  • Loading branch information
clefebvre committed Feb 15, 2013
1 parent 618d0d0 commit 3da82f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/mintstick.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def raw_write(self, source, target):
while gtk.events_pending():
gtk.main_iteration(True)

total_size = float(os.path.getsize(source))
total_size = float(os.path.getsize(source))
# Add launcher string, only when not root
launcher = ''
size=''
Expand All @@ -166,8 +166,9 @@ def raw_write(self, source, target):
flag = False
while gtk.events_pending():
gtk.main_iteration(True)
if flag:
progress.set_fraction(size)
if flag:
progress.set_fraction(size)
progress.set_text("%3.0f%%" % (float(size)*100))

if size == 1.0:
self.logger(_('Image ')+source.split('/')[-1]+_(' successfully written to')+target)
Expand Down

0 comments on commit 3da82f0

Please sign in to comment.