* src/DataViews/_PedigreeView.py,
* src/DataViews/_RelationView.py, * src/DisplayModels/_PeopleModel.py: Only show fallbacks for birth and death if role=primary svn: r7605
This commit is contained in:
parent
d2ae1cfb27
commit
3bff15e1a8
@ -1,5 +1,9 @@
|
||||
2006-11-10 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/plugins/ImportGeneWeb.py: Start parsing titles of a person
|
||||
* src/DataViews/_PedigreeView.py,
|
||||
* src/DataViews/_RelationView.py,
|
||||
* src/DisplayModels/_PeopleModel.py: Only show fallbacks for birth
|
||||
and death if role=primary
|
||||
|
||||
2006-11-09 Alex Roitman <shura@gramps-project.org>
|
||||
* src/Filters/Rules/Person/_HasDeath.py (apply): Match any of the
|
||||
|
@ -399,7 +399,8 @@ class FormattingHelper:
|
||||
else:
|
||||
for event_ref in person.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event.get_type() in [RelLib.EventType.CHRISTEN, RelLib.EventType.BAPTISM]:
|
||||
if event.get_type() in [RelLib.EventType.CHRISTEN, RelLib.EventType.BAPTISM] and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
birth = event
|
||||
birth_fallback = True
|
||||
break
|
||||
@ -412,7 +413,8 @@ class FormattingHelper:
|
||||
else:
|
||||
for event_ref in person.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event.get_type() in [RelLib.EventType.BURIAL, RelLib.EventType.CREMATION]:
|
||||
if event.get_type() in [RelLib.EventType.BURIAL, RelLib.EventType.CREMATION] and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
death = event
|
||||
death_fallback = True
|
||||
break
|
||||
|
@ -493,11 +493,13 @@ class RelationshipView(PageView.PersonNavView):
|
||||
else:
|
||||
for event_ref in person.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event.get_type() == RelLib.EventType.CHRISTEN:
|
||||
if event.get_type() == RelLib.EventType.CHRISTEN and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
birth_title = _('Christening')
|
||||
birth = event
|
||||
break
|
||||
if event.get_type() == RelLib.EventType.BAPTISM:
|
||||
if event.get_type() == RelLib.EventType.BAPTISM and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
birth_title = _('Baptism')
|
||||
birth = event
|
||||
break
|
||||
@ -515,11 +517,13 @@ class RelationshipView(PageView.PersonNavView):
|
||||
else:
|
||||
for event_ref in person.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event.get_type() == RelLib.EventType.BURIAL:
|
||||
if event.get_type() == RelLib.EventType.BURIAL and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
death_title = _('Burial')
|
||||
death = event
|
||||
break
|
||||
if event.get_type() == RelLib.EventType.CREMATION:
|
||||
if event.get_type() == RelLib.EventType.CREMATION and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
death_title = _('Cremation')
|
||||
death = event
|
||||
break
|
||||
@ -792,7 +796,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
else:
|
||||
for event_ref in child.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event.get_type() in [RelLib.EventType.CHRISTEN, RelLib.EventType.BAPTISM]:
|
||||
if event.get_type() in [RelLib.EventType.CHRISTEN, RelLib.EventType.BAPTISM] and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
birth = event
|
||||
birth_fallback = True
|
||||
break
|
||||
@ -805,7 +810,8 @@ class RelationshipView(PageView.PersonNavView):
|
||||
else:
|
||||
for event_ref in child.get_event_ref_list():
|
||||
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||
if event.get_type() in [RelLib.EventType.BURIAL, RelLib.EventType.CREMATION]:
|
||||
if event.get_type() in [RelLib.EventType.BURIAL, RelLib.EventType.CREMATION] and\
|
||||
event_ref.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
death = event
|
||||
death_fallback = True
|
||||
break
|
||||
|
@ -455,6 +455,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
etype = event.get_type()
|
||||
date_str = DateHandler.get_date(event)
|
||||
if (etype in [EventType.BAPTISM, EventType.CHRISTEN]
|
||||
and er.get_role() == RelLib.EventRoleType.PRIMARY
|
||||
and date_str != ""):
|
||||
return "<i>" + cgi.escape(date_str) + "</i>"
|
||||
|
||||
@ -481,6 +482,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
etype = event.get_type()
|
||||
date_str = DateHandler.get_date(event)
|
||||
if (etype in [EventType.BURIAL, EventType.CREMATION]
|
||||
and er.get_role() == RelLib.EventRoleType.PRIMARY
|
||||
and date_str != ""):
|
||||
return "<i>" + cgi.escape(date_str) + "</i>"
|
||||
|
||||
@ -509,7 +511,8 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
er.unserialize(event_ref)
|
||||
event = self.db.get_event_from_handle(er.ref)
|
||||
etype = event.get_type()
|
||||
if etype in [EventType.BAPTISM, EventType.CHRISTEN]:
|
||||
if etype in [EventType.BAPTISM, EventType.CHRISTEN]\
|
||||
and er.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
place_handle = event.get_place_handle()
|
||||
if place_handle:
|
||||
place = self.db.get_place_from_handle(place_handle)
|
||||
@ -542,7 +545,8 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
er.unserialize(event_ref)
|
||||
event = self.db.get_event_from_handle(er.ref)
|
||||
etype = event.get_type()
|
||||
if etype in [EventType.BURIAL, EventType.CREMATION]:
|
||||
if etype in [EventType.BURIAL, EventType.CREMATION]\
|
||||
and er.get_role() == RelLib.EventRoleType.PRIMARY:
|
||||
place_handle = event.get_place_handle()
|
||||
if place_handle:
|
||||
place = self.db.get_place_from_handle(place_handle)
|
||||
|
Loading…
Reference in New Issue
Block a user