From 0210b056d8ce47533700f46052059cf249cc003f Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 21 Apr 2006 02:05:56 +0000 Subject: [PATCH] 2006-04-20 Don Allingham * src/DataViews/_FamilyViews.py: clean up * src/DataViews/_PedigreeViews.py: clean up * src/RelLib/_Name.py: fix type on set_type svn: r6387 --- ChangeLog | 5 +++++ src/DataViews/_FamilyView.py | 2 +- src/DataViews/_PedigreeView.py | 10 +++++----- src/RelLib/_Name.py | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fa44995a..b3048c1a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-20 Don Allingham + * src/DataViews/_FamilyViews.py: clean up + * src/DataViews/_PedigreeViews.py: clean up + * src/RelLib/_Name.py: fix type on set_type + 2006-04-20 Alex Roitman * src/GrampsDb/_GrampsBSDDB.py: Upgrade to new types. * src/GrampsDb/_ReadGedcom.py: Adapt to new types. diff --git a/src/DataViews/_FamilyView.py b/src/DataViews/_FamilyView.py index 76911a738..a33afadd8 100644 --- a/src/DataViews/_FamilyView.py +++ b/src/DataViews/_FamilyView.py @@ -595,7 +595,7 @@ class FamilyView(PageView.PersonNavView): for event_ref in family.get_event_ref_list(): handle = event_ref.ref event = self.dbstate.db.get_event_from_handle(handle) - if int(event.get_type()) == RelLib.EventType.MARRIAGE: + if event.get_type() == RelLib.EventType.MARRIAGE: self.write_event_ref(_('Marriage'), event) value = True return value diff --git a/src/DataViews/_PedigreeView.py b/src/DataViews/_PedigreeView.py index 218503e5f..476d3d867 100644 --- a/src/DataViews/_PedigreeView.py +++ b/src/DataViews/_PedigreeView.py @@ -356,7 +356,7 @@ class FormattingHelper: text = "" for event_ref in family.get_event_ref_list(): event = self.db.get_event_from_handle(event_ref.ref) - if event and int(event.get_type()) == RelLib.EventType.MARRIAGE: + if event and event.get_type() == RelLib.EventType.MARRIAGE: if line_count < 3: return DateHandler.get_date(event) name = str(event.get_type()) @@ -1593,10 +1593,10 @@ def build_detail_string(db,person): else: for event_ref in person.get_event_ref_list(): event = db.get_event_from_handle(event_ref.ref) - if event and int(event.get_type()) == RelLib.EventType.BAPTISM: + if event and event.get_type() == RelLib.EventType.BAPTISM: detail_text += format_event(db, _BAPT, event) break - if event and int(event.get_type()) == RelLib.EventType.CHRISTEN: + if event and event.get_type() == RelLib.EventType.CHRISTEN: detail_text += format_event(db, _CHRI, event) break @@ -1607,10 +1607,10 @@ def build_detail_string(db,person): else: for event_ref in person.get_event_ref_list(): event = db.get_event_from_handle(event_ref.ref) - if event and int(event.get_type()) == RelLib.EventType.BURIAL: + if event and event.get_type() == RelLib.EventType.BURIAL: detail_text += format_event(db, _BURI, event) break - if event and int(event.get_type()) == RelLib.EventType.CREMATION: + if event and event.get_type() == RelLib.EventType.CREMATION: detail_text += format_event(db, _CREM, event) break diff --git a/src/RelLib/_Name.py b/src/RelLib/_Name.py index 9de30eb3e..9272dcef0 100644 --- a/src/RelLib/_Name.py +++ b/src/RelLib/_Name.py @@ -234,7 +234,7 @@ class Name(BaseObject,PrivacyBase,SourceBase,NoteBase,DateBase): def set_type(self,the_type): """sets the type of the Name instance""" - self.type(the_type) + self.type.set(the_type) def get_type(self): """returns the type of the Name instance"""