From 191312c95ad91b71bbadd9187160e280c88a7827 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 28 Jun 2004 19:08:15 +0000 Subject: [PATCH] * src/plugins/WebPage.py (IndividualPage.write_urls): Add function; (IndividualPage.create_page): use write_urls(). svn: r3242 --- gramps2/ChangeLog | 3 +++ gramps2/src/plugins/WebPage.py | 38 ++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ced6034d6..07049c88b 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -4,6 +4,9 @@ * src/gramps_main.py: Use new DbPrompter classes. * src/ArgHandler.py: Use new DbPrompter classes. + * src/plugins/WebPage.py (IndividualPage.write_urls): + Add function; (IndividualPage.create_page): use write_urls(). + 2004-06-27 Don Allingham * src/gramps_main.py: fix import problem diff --git a/gramps2/src/plugins/WebPage.py b/gramps2/src/plugins/WebPage.py index fa0325b1d..8049fe30d 100644 --- a/gramps2/src/plugins/WebPage.py +++ b/gramps2/src/plugins/WebPage.py @@ -366,6 +366,7 @@ class IndividualPage: self.doc.start_paragraph("Data") self.doc.end_paragraph() + self.write_urls() self.write_facts() self.write_notes() self.write_families() @@ -480,6 +481,29 @@ class IndividualPage: # # #-------------------------------------------------------------------- + def write_urls(self): + + first = 1 + + for url in self.person.get_url_list(): + if url.get_privacy() and self.private: + continue + + if first: + first = 0 + self.doc.start_paragraph("UrlTitle") + self.doc.write_text(_("Links")) + self.doc.end_paragraph() + self.doc.start_paragraph("UrlList") + + self.doc.start_link(url.get_path()) + self.doc.write_text(url.get_description()) + self.doc.end_link() + self.doc.newline() + + if not first: + self.doc.end_paragraph() + def write_facts(self): if self.alive: @@ -1337,6 +1361,20 @@ class WebReportDialog(Report.ReportDialog): p.set_description(_("The style used for the note information.")) self.default_style.add_style("NotesParagraph",p) + font = BaseDoc.FontStyle() + font.set(bold=1,face=BaseDoc.FONT_SANS_SERIF,size=12,italic=1) + p = BaseDoc.ParagraphStyle() + p.set(font=font,bborder=1) + p.set_description(_("The style used for the header for the URL section.")) + self.default_style.add_style("UrlTitle",p) + + font = BaseDoc.FontStyle() + font.set_size(12) + p = BaseDoc.ParagraphStyle() + p.set_font(font) + p.set_description(_("The style used for the URL information.")) + self.default_style.add_style("UrlList",p) + #------------------------------------------------------------------------ # # Functions related to selecting/changing the current file format