type changes
svn: r6375
This commit is contained in:
parent
62f02f43b2
commit
a71ac389b2
@ -764,9 +764,9 @@ class PersonEventEmbedList(EventEmbedList):
|
|||||||
|
|
||||||
for ref in self.orig_data:
|
for ref in self.orig_data:
|
||||||
event = self.dbstate.db.get_event_from_handle(ref.ref)
|
event = self.dbstate.db.get_event_from_handle(ref.ref)
|
||||||
if birth_ref == None and int(event.get_type()) == RelLib.EventType.BIRTH:
|
if birth_ref == None and event.get_type() == RelLib.EventType.BIRTH:
|
||||||
birth_ref = ref
|
birth_ref = ref
|
||||||
elif death_ref == None and int(event.get_type()) == RelLib.EventType.DEATH:
|
elif death_ref == None and event.get_type() == RelLib.EventType.DEATH:
|
||||||
death_ref = ref
|
death_ref = ref
|
||||||
else:
|
else:
|
||||||
new_list.append(ref)
|
new_list.append(ref)
|
||||||
|
@ -1649,7 +1649,7 @@ class IsWitness(Rule):
|
|||||||
wlist = event.get_witness_list()
|
wlist = event.get_witness_list()
|
||||||
if wlist:
|
if wlist:
|
||||||
for w in wlist:
|
for w in wlist:
|
||||||
if int(w.get_type()) == RelLib.Event.ID:
|
if w.get_type() == RelLib.Event.ID:
|
||||||
self.map.append(w.get_value())
|
self.map.append(w.get_value())
|
||||||
|
|
||||||
|
|
||||||
|
@ -776,9 +776,9 @@ class GrampsParser:
|
|||||||
self.family.add_event_ref(self.eventref)
|
self.family.add_event_ref(self.eventref)
|
||||||
elif self.person:
|
elif self.person:
|
||||||
event.personal = True
|
event.personal = True
|
||||||
if int(event.type) == RelLib.EventType.BIRTH:
|
if event.type == RelLib.EventType.BIRTH:
|
||||||
self.person.birth_ref = self.eventref
|
self.person.birth_ref = self.eventref
|
||||||
elif int(event.type) == RelLib.EventType.DEATH:
|
elif event.type == RelLib.EventType.DEATH:
|
||||||
self.person.death_ref = self.eventref
|
self.person.death_ref = self.eventref
|
||||||
else:
|
else:
|
||||||
self.person.add_event_ref(self.eventref)
|
self.person.add_event_ref(self.eventref)
|
||||||
@ -1409,9 +1409,9 @@ class GrampsParser:
|
|||||||
ref.ref = self.event.handle
|
ref.ref = self.event.handle
|
||||||
ref.private = self.event.private
|
ref.private = self.event.private
|
||||||
ref.role.set(RelLib.EventRoleType.PRIMARY)
|
ref.role.set(RelLib.EventRoleType.PRIMARY)
|
||||||
if int(self.event.type) == RelLib.EventType.BIRTH:
|
if self.event.type == RelLib.EventType.BIRTH:
|
||||||
self.person.birth_ref = ref
|
self.person.birth_ref = ref
|
||||||
elif int(self.event.type) == RelLib.EventType.DEATH:
|
elif self.event.type == RelLib.EventType.DEATH:
|
||||||
self.person.death_ref = ref
|
self.person.death_ref = ref
|
||||||
else:
|
else:
|
||||||
self.person.add_event_ref(ref)
|
self.person.add_event_ref(ref)
|
||||||
|
@ -41,6 +41,7 @@ pkgdata_PYTHON = \
|
|||||||
_PrivateSourceNote.py\
|
_PrivateSourceNote.py\
|
||||||
_RepoRef.py\
|
_RepoRef.py\
|
||||||
_Repository.py\
|
_Repository.py\
|
||||||
|
_RepositoryType.py\
|
||||||
_Researcher.py\
|
_Researcher.py\
|
||||||
_SourceNote.py\
|
_SourceNote.py\
|
||||||
_Source.py\
|
_Source.py\
|
||||||
|
@ -353,7 +353,7 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase,
|
|||||||
DeprecationWarning, 2)
|
DeprecationWarning, 2)
|
||||||
# Wrapper for old API
|
# Wrapper for old API
|
||||||
# remove when transitition done.
|
# remove when transitition done.
|
||||||
return int(self.marker) == MarkerType.COMPLETE
|
return self.marker == MarkerType.COMPLETE
|
||||||
|
|
||||||
def set_primary_name(self, name):
|
def set_primary_name(self, name):
|
||||||
"""
|
"""
|
||||||
|
@ -118,7 +118,7 @@ class SubstKeywords:
|
|||||||
if not e_ref:
|
if not e_ref:
|
||||||
continue
|
continue
|
||||||
e = database.get_event_from_handle(e_ref.ref)
|
e = database.get_event_from_handle(e_ref.ref)
|
||||||
if int(e.get_type()) == RelLib.EventType.MARRIAGE:
|
if e.get_type() == RelLib.EventType.MARRIAGE:
|
||||||
self.m = DateHandler.get_date(e)
|
self.m = DateHandler.get_date(e)
|
||||||
mplace_handle = e.get_place_handle()
|
mplace_handle = e.get_place_handle()
|
||||||
if mplace_handle:
|
if mplace_handle:
|
||||||
|
@ -676,9 +676,9 @@ def probably_alive(person,db,current_year=None,limit=0):
|
|||||||
# These are fairly good indications that someone's not alive.
|
# These are fairly good indications that someone's not alive.
|
||||||
for ev_ref in person.event_ref_list:
|
for ev_ref in person.event_ref_list:
|
||||||
ev = db.get_event_from_handle(ev_ref.ref)
|
ev = db.get_event_from_handle(ev_ref.ref)
|
||||||
if ev and int(ev.get_type())in [RelLib.EventType.CAUSE_DEATH,
|
if ev and int(ev.get_type()) in [RelLib.EventType.CAUSE_DEATH,
|
||||||
RelLib.EventType.BURIAL,
|
RelLib.EventType.BURIAL,
|
||||||
RelLib.EventType.CREMATION]:
|
RelLib.EventType.CREMATION]:
|
||||||
if not death_year:
|
if not death_year:
|
||||||
death_year = ev.get_date_object().get_year()
|
death_year = ev.get_date_object().get_year()
|
||||||
if ev.get_date_object().get_start_date() != RelLib.Date.EMPTY:
|
if ev.get_date_object().get_start_date() != RelLib.Date.EMPTY:
|
||||||
|
@ -244,9 +244,9 @@ class Verify(Tool.Tool, ManagedWindow.ManagedWindow):
|
|||||||
if event_ref:
|
if event_ref:
|
||||||
event_handle = event_ref.ref
|
event_handle = event_ref.ref
|
||||||
event = self.db.get_event_from_handle(event_handle)
|
event = self.db.get_event_from_handle(event_handle)
|
||||||
if int(event.get_type()) == RelLib.EventType.BURIAL:
|
if event.get_type() == RelLib.EventType.BURIAL:
|
||||||
buryear = self.get_year( event.get_handle() )
|
buryear = self.get_year( event.get_handle() )
|
||||||
elif int(event.get_type()) == RelLib.EventType.BAPTISM:
|
elif event.get_type() == RelLib.EventType.BAPTISM:
|
||||||
bapyear = self.get_year( event.get_handle() )
|
bapyear = self.get_year( event.get_handle() )
|
||||||
|
|
||||||
if byear>0 and bapyear>0:
|
if byear>0 and bapyear>0:
|
||||||
|
Loading…
Reference in New Issue
Block a user