6568: graphic descendant tree report inserts a bogus title

svn: r21817
This commit is contained in:
Paul Franklin 2013-03-30 04:32:28 +00:00
parent 2e7e0d7666
commit bc6c23bc65
3 changed files with 7 additions and 8 deletions

View File

@ -131,12 +131,15 @@ class FamilyBox(AncestorBoxBase):
#------------------------------------------------------------------------ #------------------------------------------------------------------------
class TitleN(TitleNoDisplay): class TitleN(TitleNoDisplay):
"""No Title class for the report """ """No Title class for the report """
def __init__(self, doc): def __init__(self, doc):
TitleNoDisplay.__init__(self, doc, "AC2-Title") TitleNoDisplay.__init__(self, doc, "AC2-Title")
def calc_title(self, center): def calc_title(self, center):
"""Calculate the title of the report""" """Calculate the title of the report"""
self.text = _("Ancestor Graph") #we want no text, but need a text for the TOC in a book!
self.mark_text = _("Ancestor Graph")
self.text = ''
class TitleA(TitleBox): class TitleA(TitleBox):
"""Title class for the report """ """Title class for the report """

View File

@ -203,7 +203,7 @@ class DescendantTitleBase(TitleBox):
return parents return parents
class TitleNone(TitleNoDisplay): class TitleNone(TitleNoDisplay):
"""Family Chart Title class for the report """ """No Title class for the report """
def __init__(self, dbase, doc): def __init__(self, dbase, doc):
TitleNoDisplay.__init__(self, doc, "CG2-Title") TitleNoDisplay.__init__(self, doc, "CG2-Title")
@ -211,7 +211,7 @@ class TitleNone(TitleNoDisplay):
def calc_title(self, persons): def calc_title(self, persons):
"""Calculate the title of the report""" """Calculate the title of the report"""
#we want no text, but need a text for the TOC in a book! #we want no text, but need a text for the TOC in a book!
self.mark_text = 'Descendant Graph' self.mark_text = _('Descendant Graph')
self.text = '' self.text = ''
class TitleDPY(DescendantTitleBase): class TitleDPY(DescendantTitleBase):

View File

@ -36,12 +36,10 @@ from __future__ import division
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gramps.gen.const import GRAMPS_LOCALE as glocale from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.get_translation().sgettext _ = glocale.get_translation().sgettext
from gramps.gen.plug.report import utils as ReportUtils from gramps.gen.plug.report import utils as ReportUtils
from gramps.gen.display.name import displayer as name_displayer from gramps.gen.display.name import displayer as name_displayer
from gramps.plugins.lib.libsubstkeyword import SubstKeywords from gramps.plugins.lib.libsubstkeyword import SubstKeywords
from gramps.gen.plug.docgen import (IndexMark, INDEX_TYPE_TOC)
PT2CM = ReportUtils.pt2cm PT2CM = ReportUtils.pt2cm
@ -645,7 +643,6 @@ class TitleNoDisplay(BoxBase):
def display(self): def display(self):
""" display the title box. """ """ display the title box. """
#Set up the Table of Contents here #Set up the Table of Contents here
from gramps.gen.plug.docgen import (IndexMark, INDEX_TYPE_TOC) # interim, here
if self.mark_text is None: if self.mark_text is None:
mark = IndexMark(self.text, INDEX_TYPE_TOC, 1) mark = IndexMark(self.text, INDEX_TYPE_TOC, 1)
else: else:
@ -687,7 +684,6 @@ class TitleBox(BoxBase):
return return
#Set up the Table of Contents here #Set up the Table of Contents here
from gramps.gen.plug.docgen import (IndexMark, INDEX_TYPE_TOC) # interim, here
mark = IndexMark(self.text, INDEX_TYPE_TOC, 1) mark = IndexMark(self.text, INDEX_TYPE_TOC, 1)
if self.text: if self.text: