[GTK3] Restore and update expand_row code

This commit is contained in:
hugosenari 2018-09-14 15:01:31 +01:00 committed by Calum Lind
commit b29b6fe69f
2 changed files with 6 additions and 8 deletions

View file

@ -348,9 +348,8 @@ class AddTorrentDialog(component.Component):
_file, _file['path'], idx, _file.get('download', True), split_files _file, _file['path'], idx, _file.get('download', True), split_files
) )
self.add_files(None, split_files) self.add_files(None, split_files)
# FIXME add back expand_row root = Gtk.TreePath.new_first()
# self.listview_files.expand_row(b'0', False) self.listview_files.expand_row(root, False)
self.listview_files.expand_all()
def prepare_file(self, _file, file_name, file_num, download, files_storage): def prepare_file(self, _file, file_name, file_num, download, files_storage):
first_slash_index = file_name.find(os.path.sep) first_slash_index = file_name.find(os.path.sep)
@ -1039,9 +1038,8 @@ class AddTorrentDialog(component.Component):
# We need to re-expand the view because it might contracted # We need to re-expand the view because it might contracted
# if we change the root iter # if we change the root iter
# FIXME add back expand_row root = Gtk.TreePath.new_first()
# self.listview_files.expand_row(b'0', False) self.listview_files.expand_row(root, False)
self.listview_files.expand_all()
else: else:
# This was a simple folder rename without any splits, so just # This was a simple folder rename without any splits, so just
# change the path for itr # change the path for itr

View file

@ -377,8 +377,8 @@ class FilesTab(Tab):
def update_files(self): def update_files(self):
with listview_replace_treestore(self.listview): with listview_replace_treestore(self.listview):
self.prepare_file_store(self.files_list[self.torrent_id]) self.prepare_file_store(self.files_list[self.torrent_id])
# FIXME root = Gtk.TreePath.new_first()
# self.listview.expand_row(b'0', False) self.listview.expand_row(root, False)
def get_selected_files(self): def get_selected_files(self):
"""Returns a list of file indexes that are selected.""" """Returns a list of file indexes that are selected."""