* src/Filters/Rules/Person/_HasCompleteRecord.py: Use new marker API

* src/RelLib/_Person.py (get_complete_flag): Remove old unused API
* src/RelLib/_Family.py (get/set_complete_flag): Remove old unused API



svn: r7720
This commit is contained in:
Martin Hawlisch 2006-11-27 16:11:38 +00:00
parent f337a7e213
commit 8b8cbd50c9
4 changed files with 7 additions and 30 deletions

View File

@ -1,3 +1,8 @@
2006-11-27 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/Filters/Rules/Person/_HasCompleteRecord.py: Use new marker API
* src/RelLib/_Person.py (get_complete_flag): Remove old unused API
* src/RelLib/_Family.py (get/set_complete_flag): Remove old unused API
2006-11-27 Don Allingham <don@gramps-project.org>
* configure.in: change version number

View File

@ -33,6 +33,7 @@ from gettext import gettext as _
#
#-------------------------------------------------------------------------
from Filters.Rules._Rule import Rule
from RelLib import MarkerType
#-------------------------------------------------------------------------
#
@ -47,4 +48,4 @@ class HasCompleteRecord(Rule):
description = _('Matches all people whose records are complete')
def apply(self,db,person):
return person.get_complete_flag() == 1
return person.get_marker() == MarkerType.COMPLETE

View File

@ -251,28 +251,6 @@ class Family(PrimaryObject,SourceBase,NoteBase,MediaBase,AttributeBase,
"""
return self.get_sourcref_child_list() + self.source_list
def set_complete_flag(self,val):
"""
Sets or clears the complete flag, which is used to indicate that the
Family's data is considered to be complete.
@param val: True indicates the Family object is considered to be
complete
@type val: bool
"""
self.complete = val
def get_complete_flag(self):
"""
Returns the complete flag, which is used to indicate that the
Family's data is considered to be complete.
@return: True indicates that the Family's record is considered to
be complete.
@rtype: bool
"""
return self.complete
def set_relationship(self,relationship_type):
"""
Sets the relationship type between the people identified as the

View File

@ -334,13 +334,6 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase,
return self.get_sourcref_child_list() + self.source_list \
+ self.event_ref_list
def get_complete_flag(self):
warn( "Use get_marker instead of get_complete_flag",
DeprecationWarning, 2)
# Wrapper for old API
# remove when transitition done.
return self.marker == MarkerType.COMPLETE
def set_primary_name(self, name):
"""
Sets the primary name of the Person to the specified