mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 19:08:40 +00:00
More Files tab clean up.
This commit is contained in:
parent
a4000c46e2
commit
d07e8cddb6
1 changed files with 14 additions and 12 deletions
|
@ -500,16 +500,6 @@ class DelugeGTK:
|
||||||
self.text_summary_tracker.set_text(str(state["tracker"]))
|
self.text_summary_tracker.set_text(str(state["tracker"]))
|
||||||
# Now for the File tab
|
# Now for the File tab
|
||||||
self.file_store.clear()
|
self.file_store.clear()
|
||||||
all_files = self.manager.get_torrent_file_info(unique_id)
|
|
||||||
file_filter = self.manager.get_file_filter(unique_id)
|
|
||||||
if file_filter is None:
|
|
||||||
file_filter = [False] * len(all_files)
|
|
||||||
assert(len(all_files) == len(file_filter))
|
|
||||||
i=0
|
|
||||||
for f in all_files:
|
|
||||||
self.file_store.append([not file_filter[i], f['path'], f['size'],
|
|
||||||
round(f['progress'], 2)])
|
|
||||||
i=i+1
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -1056,11 +1046,23 @@ class DelugeGTK:
|
||||||
peer["download_speed"],
|
peer["download_speed"],
|
||||||
peer["upload_speed"]])
|
peer["upload_speed"]])
|
||||||
elif tab == 2: #file tab
|
elif tab == 2: #file tab
|
||||||
|
unique_id = self.get_selected_torrent()
|
||||||
|
|
||||||
|
# Fill self.file_store with files only once and only when we click to
|
||||||
|
# file tab or it's already open
|
||||||
|
if not self.file_store.iter_n_children(None):
|
||||||
|
all_files = self.manager.get_torrent_file_info(unique_id)
|
||||||
|
file_filter = self.manager.get_file_filter(unique_id)
|
||||||
|
if file_filter is None:
|
||||||
|
file_filter = [False] * len(all_files)
|
||||||
|
for file, filt in izip(all_files, file_filter):
|
||||||
|
self.file_store.append([not filt, file['path'],
|
||||||
|
file['size'],
|
||||||
|
round(file['progress'], 2)])
|
||||||
|
|
||||||
def biographer(model, path, iter, dictionary):
|
def biographer(model, path, iter, dictionary):
|
||||||
dictionary[model.get_value(iter, 1)] = model.get_string_from_iter(iter)
|
dictionary[model.get_value(iter, 1)] = model.get_string_from_iter(iter)
|
||||||
|
|
||||||
unique_id = self.get_selected_torrent()
|
|
||||||
|
|
||||||
new_file_info = self.manager.get_torrent_file_info(unique_id)
|
new_file_info = self.manager.get_torrent_file_info(unique_id)
|
||||||
|
|
||||||
curr_files = {}
|
curr_files = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue