diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 6cedb5742..f57c3801d 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -7,6 +7,11 @@ * src/Makefile.am: Ship Sort.py instead of sort.py. * src/plugins/Makefile.am: Ship CountAncestors.py instead of count_anc.py. + + * src/gramps.glade: Resolve widget naming conflict. + * src/SelectPerson: Resolve widget naming conflict. + + * src/Sort.py (by_date): Add function. 2004-05-05 Don Allingham * src/plugins/ReadGedcom.py: commit after media object change diff --git a/gramps2/src/Sort.py b/gramps2/src/Sort.py index 2abd6c710..507a4238d 100644 --- a/gramps2/src/Sort.py +++ b/gramps2/src/Sort.py @@ -120,3 +120,11 @@ class Sort: if val == 0: return self.by_last_name(first_id,second_id) return val + + def by_date(self,a_id,b_id): + """Sort routine for comparing two events by their dates. """ + if not (a_id and b_id): + return 0 + a = self.database.find_event_from_id(a_id) + b = self.database.find_event_from_id(b_id) + return Date.compare_dates(a.get_date_object(),b.get_date_object())