diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 814a3b51d..615129c16 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2004-02-24 Alex Roitman + * src/RelLib.py (sortbysource): Low-level implementation; + (sortbyplace): Typo. + * src/Sources.py (by_title): Remove function (superseded by + RelLib.GrampsDB.sortbysource). + 2004-02-23 Alex Roitman * src/AddrEdit.py, src/AttrEdit.py, src/EditPerson.py, src/EditSource.py, src/EventEdit.py, src/ImageSelect.py, diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index 292cb193a..517758017 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -2899,7 +2899,7 @@ class GrampsDB: def sortbyplace(self,f,s): fp = self.place_map[f][0].upper() - sp = self.place_map[f][0].upper() + sp = self.place_map[s][0].upper() return cmp(fp,sp) def sort_place_keys(self): @@ -2929,19 +2929,9 @@ class GrampsDB: return self.media_map.keys() def sortbysource(self,f,s): - if self.source_map.get(str(f)): - f1 = Source() - f1.unserialize(self.source_map.get(str(f))) - else: - return 0 - if self.source_map.get(str(s)): - s1 = Source() - s1.unserialize(self.source_map.get(str(s))) - else: - return 0 - f2 = f1.get_title().upper() - s2 = s1.get_title().upper() - return cmp(f2,s2) + f1 = self.source_map[f][1].upper() + s1 = self.source_map[s][1].upper() + return cmp(f1,s1) def set_source_keys(self): keys = self.source_map.keys() diff --git a/gramps2/src/Sources.py b/gramps2/src/Sources.py index e2d192746..63dbf736a 100644 --- a/gramps2/src/Sources.py +++ b/gramps2/src/Sources.py @@ -502,6 +502,3 @@ class SourceEditor: import EditSource EditSource.EditSource(RelLib.Source(),self.db, self,self.sourceDisplay, self.update_display) - -def by_title(first,second): - return cmp(first.get_title(),second.get_title())