* src/filters/Complete.py: Add filter matching people with the
complete flag. * src/GenericFilter.py (HasCompleteRecord): Add rule matching people with the complete records. * src/RelLib.py (Source.setAbbrev, Source.getAbbrev): Add functions. * src/WriteXML.py (write_xml_data): Save abbreviation info for sources. * src/GrampsParser.py (GrampsParser.stop_sabbrev): Parse abbreviation. * src/gramps.glade (sourceEditor): Add widgets for Call Number and Abbreviation. * src/EditSource.py: Support Call Number and Abbreviation. * src/plugins/ReadGedcom.py (parse_source): Parse abbreviation. * src/plugins/WriteGedcom.py (write_sources): Export abbreviation. * NEWS: Update. svn: r2463
This commit is contained in:
@ -18,6 +18,8 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# $Id$
|
||||
|
||||
"""Generic Filtering Routines"""
|
||||
|
||||
__author__ = "Don Allingham"
|
||||
@ -266,6 +268,29 @@ class HasIdOf(Rule):
|
||||
def apply(self,db,p):
|
||||
return p.getId() == self.list[0]
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# HasCompleteRecord
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class HasCompleteRecord(Rule):
|
||||
"""Rule that checks for a person whose record is complete"""
|
||||
|
||||
labels = []
|
||||
|
||||
def name(self):
|
||||
return 'Has complete record'
|
||||
|
||||
def category(self):
|
||||
return _('General filters')
|
||||
|
||||
def description(self):
|
||||
return _('Matches all people whose records are complete')
|
||||
|
||||
def apply(self,db,p):
|
||||
return p.getComplete() == 1
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# IsFemale
|
||||
@ -1419,6 +1444,7 @@ tasks = {
|
||||
: HasCommonAncestorWithFilterMatch,
|
||||
_("Is a female") : IsFemale,
|
||||
_("Is a male") : IsMale,
|
||||
_("Has complete record") : HasCompleteRecord,
|
||||
_("Has the personal event") : HasEvent,
|
||||
_("Has the family event") : HasFamilyEvent,
|
||||
_("Has the personal attribute") : HasAttribute,
|
||||
|
Reference in New Issue
Block a user