type changes

svn: r6375
This commit is contained in:
Don Allingham 2006-04-20 03:34:07 +00:00
parent 62f02f43b2
commit a71ac389b2
8 changed files with 15 additions and 14 deletions

View File

@ -764,9 +764,9 @@ class PersonEventEmbedList(EventEmbedList):
for ref in self.orig_data:
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
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
else:
new_list.append(ref)

View File

@ -1649,7 +1649,7 @@ class IsWitness(Rule):
wlist = event.get_witness_list()
if 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())

View File

@ -776,9 +776,9 @@ class GrampsParser:
self.family.add_event_ref(self.eventref)
elif self.person:
event.personal = True
if int(event.type) == RelLib.EventType.BIRTH:
if event.type == RelLib.EventType.BIRTH:
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
else:
self.person.add_event_ref(self.eventref)
@ -1409,9 +1409,9 @@ class GrampsParser:
ref.ref = self.event.handle
ref.private = self.event.private
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
elif int(self.event.type) == RelLib.EventType.DEATH:
elif self.event.type == RelLib.EventType.DEATH:
self.person.death_ref = ref
else:
self.person.add_event_ref(ref)

View File

@ -41,6 +41,7 @@ pkgdata_PYTHON = \
_PrivateSourceNote.py\
_RepoRef.py\
_Repository.py\
_RepositoryType.py\
_Researcher.py\
_SourceNote.py\
_Source.py\

View File

@ -353,7 +353,7 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase,
DeprecationWarning, 2)
# Wrapper for old API
# remove when transitition done.
return int(self.marker) == MarkerType.COMPLETE
return self.marker == MarkerType.COMPLETE
def set_primary_name(self, name):
"""

View File

@ -118,7 +118,7 @@ class SubstKeywords:
if not e_ref:
continue
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)
mplace_handle = e.get_place_handle()
if mplace_handle:

View File

@ -244,9 +244,9 @@ class Verify(Tool.Tool, ManagedWindow.ManagedWindow):
if event_ref:
event_handle = event_ref.ref
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() )
elif int(event.get_type()) == RelLib.EventType.BAPTISM:
elif event.get_type() == RelLib.EventType.BAPTISM:
bapyear = self.get_year( event.get_handle() )
if byear>0 and bapyear>0: