various: enhance indexing with IndexMark

svn: r6850
This commit is contained in:
Brian Matherly
2006-06-03 03:32:26 +00:00
parent 20aa297a21
commit 0c008ceb78
23 changed files with 142 additions and 101 deletions

View File

@ -43,6 +43,7 @@ import DateHandler
import RelLib
from NameDisplay import displayer as _nd
from QuestionDialog import WarningDialog
import BaseDoc
#------------------------------------------------------------------------
#
@ -2202,15 +2203,15 @@ def common_name(person,use_nick=False):
# Indexing function
#
#-------------------------------------------------------------------------
def get_person_key(db,person):
def get_person_mark(db,person):
"""
Returns a key that can be used to index a person in a report
Returns a IndexMark that can be used to index a person in a report
@param db: the GRAMPS database instance
@param person: the the key is for
"""
if not person:
return ""
return None
name = person.get_primary_name().get_name()
birth = " "
@ -2232,4 +2233,4 @@ def get_person_key(db,person):
else:
key = "%s (%s - %s)" % (name,birth,death)
return key
return BaseDoc.IndexMark( key, BaseDoc.INDEX_TYPE_ALP )