mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-04 23:45:04 -04:00
Use the QListWidgetItems for building lists of filenames. Set, but avoid displaying, the QString from Qt.DisplayRole which is necessary for correct sorting in the list
This commit is contained in:
parent
4002bb5547
commit
21b08252d3
2 changed files with 18 additions and 11 deletions
|
@ -410,8 +410,11 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
|
||||
# add progress bar to the status bar, indicating the crunching of files.
|
||||
self._zip_progress_bar = ZipProgressBar(0)
|
||||
self._zip_progress_bar.total_files_size = OnionShareGui._compute_total_size(
|
||||
self.file_selection.file_list.filenames)
|
||||
self.filenames = []
|
||||
for index in range(self.file_selection.file_list.count()):
|
||||
self.filenames.append(self.file_selection.file_list.item(index).filename)
|
||||
|
||||
self._zip_progress_bar.total_files_size = OnionShareGui._compute_total_size(self.filenames)
|
||||
self.status_bar.insertWidget(0, self._zip_progress_bar)
|
||||
|
||||
# prepare the files for sending in a new thread
|
||||
|
@ -421,7 +424,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
if self._zip_progress_bar != None:
|
||||
self._zip_progress_bar.update_processed_size_signal.emit(x)
|
||||
try:
|
||||
web.set_file_info(self.file_selection.file_list.filenames, processed_size_callback=_set_processed_size)
|
||||
web.set_file_info(self.filenames, processed_size_callback=_set_processed_size)
|
||||
self.app.cleanup_filenames.append(web.zip_filename)
|
||||
self.starting_server_step3.emit()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue