sort the plugins in the first two Help => Plugin Manager tabs

svn: r18656
This commit is contained in:
Paul Franklin 2011-12-27 17:35:12 +00:00
parent 2c2a76b5a2
commit 945bf7cf97

View File

@ -477,7 +477,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
'<span weight="bold" color="red">%s</span>' % _('Fail'), '<span weight="bold" color="red">%s</span>' % _('Fail'),
i[0], str(i[1][1]), i[1], pdata.id, hiddenstr]) i[0], str(i[1][1]), i[1], pdata.id, hiddenstr])
success_list = self.__pmgr.get_success_list() success_list = sorted(self.__pmgr.get_success_list())
for i in success_list: for i in success_list:
# i = (filename, module, pdata) # i = (filename, module, pdata)
pdata = i[2] pdata = i[2]
@ -494,6 +494,7 @@ class PluginStatus(ManagedWindow.ManagedWindow):
def __populate_reg_list(self): def __populate_reg_list(self):
""" Build list of registered plugins""" """ Build list of registered plugins"""
for (type, typestr) in PTYPE_STR.iteritems(): for (type, typestr) in PTYPE_STR.iteritems():
registered_plugins = []
for pdata in self.__preg.type_plugins(type): for pdata in self.__preg.type_plugins(type):
# model: plugintype, hidden, pluginname, plugindescr, pluginid # model: plugintype, hidden, pluginname, plugindescr, pluginid
hidden = pdata.id in self.hidden hidden = pdata.id in self.hidden
@ -501,9 +502,10 @@ class PluginStatus(ManagedWindow.ManagedWindow):
hiddenstr = self.HIDDEN hiddenstr = self.HIDDEN
else: else:
hiddenstr = self.AVAILABLE hiddenstr = self.AVAILABLE
self.model_reg.append(row=[ registered_plugins.append([typestr, hiddenstr, pdata.name,
typestr, hiddenstr, pdata.name, pdata.description, pdata.description, pdata.id])
pdata.id]) for row in sorted(registered_plugins):
self.model_reg.append(row)
def __rebuild_load_list(self): def __rebuild_load_list(self):
self.model.clear() self.model.clear()