mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
sort the list of filenames being shared
This commit is contained in:
parent
9ed128938f
commit
36914114f9
@ -27,6 +27,8 @@ def set_file_info(filenames):
|
||||
info['size'] = helpers.dir_size(filename)
|
||||
info['size_human'] = helpers.human_readable_filesize(info['size'])
|
||||
file_info['dirs'].append(info)
|
||||
file_info['files'] = sorted(file_info['files'], key=lambda k: k['basename'])
|
||||
file_info['dirs'] = sorted(file_info['dirs'], key=lambda k: k['basename'])
|
||||
|
||||
# zip up the files and folders
|
||||
z = helpers.ZipWriter()
|
||||
|
@ -12,6 +12,7 @@ class FileList(QtGui.QListWidget):
|
||||
super(FileList, self).__init__(parent)
|
||||
self.setAcceptDrops(True)
|
||||
self.setIconSize(QtCore.QSize(32, 32))
|
||||
self.setSortingEnabled(True)
|
||||
|
||||
# drag and drop label
|
||||
self.drop_label = QtGui.QLabel(QtCore.QString(strings._('gui_drag_and_drop')), parent=self)
|
||||
|
Loading…
Reference in New Issue
Block a user