From 8725f2e236ca520dcbb938c8f0d1912c288ccf55 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Wed, 10 Apr 2013 19:05:56 +0000 Subject: [PATCH] add TOC entry, for book report svn: r21950 --- gramps/plugins/textreport/recordsreport.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gramps/plugins/textreport/recordsreport.py b/gramps/plugins/textreport/recordsreport.py index f19269f0b..d336b3a3f 100644 --- a/gramps/plugins/textreport/recordsreport.py +++ b/gramps/plugins/textreport/recordsreport.py @@ -38,7 +38,7 @@ _ = glocale.get_translation().sgettext from gramps.plugins.lib.librecords import (RECORDS, find_records, CALLNAME_DONTUSE, CALLNAME_REPLACE, CALLNAME_UNDERLINE_ADD) from gramps.gen.plug.docgen import (FontStyle, ParagraphStyle, FONT_SANS_SERIF, - PARA_ALIGN_CENTER) + PARA_ALIGN_CENTER, IndexMark, INDEX_TYPE_TOC) from gramps.gen.plug.menu import (BooleanOption, EnumeratedListOption, FilterOption, NumberOption, PersonOption, StringOption) from gramps.gen.plug.report import Report @@ -79,7 +79,9 @@ class RecordsReport(Report): records = find_records(self.database, self.filter, self.top_size, self.callname) self.doc.start_paragraph('REC-Title') - self.doc.write_text(_("Records")) + title = _("Records") + mark = IndexMark(title, INDEX_TYPE_TOC, 1) + self.doc.write_text(title, mark) self.doc.end_paragraph() self.doc.start_paragraph('REC-Subtitle')