mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Plugin customization GUI: Sort plugins by name
This commit is contained in:
parent
66d2604458
commit
fcdcd68adf
@ -109,6 +109,9 @@ class PluginModel(QAbstractItemModel):
|
|||||||
self._data[plugin.type].append(plugin)
|
self._data[plugin.type].append(plugin)
|
||||||
self.categories = sorted(self._data.keys())
|
self.categories = sorted(self._data.keys())
|
||||||
|
|
||||||
|
for plugins in self._data.values():
|
||||||
|
plugins.sort(cmp=lambda x, y: cmp(x.name.lower(), y.name.lower()))
|
||||||
|
|
||||||
def index(self, row, column, parent):
|
def index(self, row, column, parent):
|
||||||
if not self.hasIndex(row, column, parent):
|
if not self.hasIndex(row, column, parent):
|
||||||
return QModelIndex()
|
return QModelIndex()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user