0002841: Kinship report converts relationship descriptions to lowercase

patch by Reinhard Müller <reinhard.mueller@bytewise.at> 

svn: r12948
This commit is contained in:
Raphael Ackermann 2009-08-10 19:09:37 +00:00
parent 7640de64ea
commit f6f1cdf05c

View File

@ -3,6 +3,7 @@
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2009 Gary Burton
# Contribution 2009 by Reinhard Mueller <reinhard.mueller@bytewise.at>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -29,7 +30,6 @@
#
#------------------------------------------------------------------------
from gettext import gettext as _
from string import capitalize
#------------------------------------------------------------------------
#
@ -37,10 +37,10 @@ from string import capitalize
#
#------------------------------------------------------------------------
from gen.plug import PluginManager
from gen.plug.menu import NumberOption, BooleanOption, PersonOption
from ReportBase import Report, ReportUtils, MenuReportOptions, CATEGORY_TEXT
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
from gen.plug.menu import NumberOption, BooleanOption, PersonOption
from ReportBase import Report, ReportUtils, MenuReportOptions, CATEGORY_TEXT
from BasicUtils import name_displayer
import DateHandler
@ -58,7 +58,6 @@ class KinshipReport(Report):
The arguments are:
database - the GRAMPS database instance
person - currently selected person
options_class - instance of the Options class for this report
This report needs the following parameters (class variables)
@ -83,8 +82,7 @@ class KinshipReport(Report):
self.person = database.get_person_from_gramps_id(pid)
self.__db = database
pmgr = PluginManager.get_instance()
self.rel_calc = pmgr.get_relationship_calculator()
self.rel_calc = PluginManager.get_instance().get_relationship_calculator()
self.kinship_map = {}
self.spouse_map = {}
@ -280,7 +278,7 @@ class KinshipReport(Report):
"""
Write information about a group of people - including the title.
"""
cap_title = capitalize(title)
cap_title = title[0].upper() + title[1:]
subtitle = "%s (%d)" % (cap_title, len(people_handles))
self.doc.start_paragraph("KIN-Subtitle")
mark = IndexMark(cap_title, INDEX_TYPE_TOC, 2)