From a7cf957319ec1a5c5f974e0afef6256a8be8b73f Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Wed, 22 Jun 2011 12:14:52 +0000 Subject: [PATCH] 0004977: feature request: sorted "Available Items" in Book Report (Patch from Paul Franklin) svn: r17826 --- src/plugins/BookReport.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/BookReport.py b/src/plugins/BookReport.py index b0a29cdc3..5cd111bab 100644 --- a/src/plugins/BookReport.py +++ b/src/plugins/BookReport.py @@ -4,6 +4,7 @@ # Copyright (C) 2003-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant +# Copyright (C) 2011 Paul Franklin # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -802,13 +803,14 @@ class BookReportSelector(ManagedWindow.ManagedWindow): if not regbi: return + available_reports = [] for pdata in regbi: if not pdata.supported: category = _UNSUPPORTED else: category = book_categories[pdata.category] - - data = [pdata.name, category, pdata.id ] + available_reports.append([ pdata.name, category, pdata.id ]) + for data in sorted(available_reports): new_iter = self.avail_model.add(data) self.avail_model.connect_model()