2006-04-20 Don Allingham <don@gramps-project.org>

* src/DataViews/_FamilyViews.py: clean up
	* src/DataViews/_PedigreeViews.py: clean up
	* src/RelLib/_Name.py: fix type on set_type



svn: r6387
This commit is contained in:
Don Allingham 2006-04-21 02:05:56 +00:00
parent dce92d31a3
commit 6ed8949106
4 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2006-04-20 Don Allingham <don@gramps-project.org>
* 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 <shura@gramps-project.org>
* src/GrampsDb/_GrampsBSDDB.py: Upgrade to new types.
* src/GrampsDb/_ReadGedcom.py: Adapt to new types.

View File

@ -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

View File

@ -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

View File

@ -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"""