Sort the names in the manage file excludes list

This commit is contained in:
Kovid Goyal 2021-12-17 07:29:41 +05:30
parent 3477e6395c
commit ba1b75e9fd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -934,7 +934,8 @@ class ManageExcludedFiles(Dialog):
self.files = QListWidget(self) self.files = QListWidget(self)
self.files.setSelectionMode(QAbstractItemView.SelectionMode.MultiSelection) self.files.setSelectionMode(QAbstractItemView.SelectionMode.MultiSelection)
cc = current_container() cc = current_container()
for name, mt in cc.mime_map.items(): for name in sorted(cc.mime_map):
mt = cc.mime_map[name]
if mt in OEB_DOCS or mt in (NCX_MIME, OPF_MIME): if mt in OEB_DOCS or mt in (NCX_MIME, OPF_MIME):
i = QListWidgetItem(self.files) i = QListWidgetItem(self.files)
i.setText(name) i.setText(name)