i'm an idiot

This commit is contained in:
Marcos Pinto 2007-06-12 02:27:29 +00:00
parent 127e85c565
commit 71a25a4c9c
1 changed files with 9 additions and 1 deletions

View File

@ -350,7 +350,14 @@ class DelugeGTK:
assert(len(all_files) == len(file_filter)) assert(len(all_files) == len(file_filter))
i=0 i=0
for f in all_files: for f in all_files:
self.file_store.append([not file_filter[i], f['path'], common.fsize(f['size']), f['offset']]) if f['progress'] < 10:
progress = '00''%.2f%%'%f['progress']
elif f['progress'] >= 10 and f['progress'] < 100:
progress = '0''%.2f%%'%f['progress']
elif f['progress'] == 100:
progress = '%.2f%%'%f['progress']
self.file_store.append([not file_filter[i], f['path'], common.fsize(f['size']),
f['offset'], progress])
i=i+1 i=i+1
return True return True
@ -456,6 +463,7 @@ class DelugeGTK:
dgtk.add_text_column(self.file_view, _("Filename"), 1).set_expand(True) dgtk.add_text_column(self.file_view, _("Filename"), 1).set_expand(True)
dgtk.add_text_column(self.file_view, _("Size"), 2) dgtk.add_text_column(self.file_view, _("Size"), 2)
dgtk.add_text_column(self.file_view, _("Offset"), 3) dgtk.add_text_column(self.file_view, _("Offset"), 3)
dgtk.add_text_column(self.file_view, _("Progress"), 4).set_visible(False)
def file_select_all(self, widget): def file_select_all(self, widget):
self.file_view.get_selection().select_all() self.file_view.get_selection().select_all()