From b53ecab74b53d06ab4167a882b1134f7213bc526 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 22 Jul 2003 04:45:05 +0000 Subject: [PATCH] * src/Sources.py: sort sources by title svn: r1916 --- src/Sources.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Sources.py b/src/Sources.py index d73d474d5..e88fdf73c 100644 --- a/src/Sources.py +++ b/src/Sources.py @@ -296,7 +296,8 @@ class SourceEditor: self.pub_field.set_text("") values = self.db.getSourceMap().values() - + values.sort(by_title) + sel_child = None self.list = [] self.active_source = sel @@ -373,3 +374,5 @@ class SourceEditor: EditSource.EditSource(RelLib.Source(),self.db, self.update_display) +def by_title(first,second): + return cmp(first.getTitle(),second.getTitle())