diff --git a/ChangeLog b/ChangeLog index 5812ab7d6..06cb43e59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-11-03 Stéphane Charette + * src/plugins/NarrativeWeb.py: resize and link to large images + 2007-11-03 Gary Burton * src/plugins/DetDescendantReport.py * src/plugins/DetAncestralReport.py diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index cfe7fd954..31b570ff1 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -78,6 +78,7 @@ from ReportBase._CommandLineReport import CommandLineReport import Errors import Utils import ThumbNails +import ImgManip import GrampsLocale import Mime from QuestionDialog import ErrorDialog, WarningDialog @@ -96,6 +97,8 @@ from gen.lib.eventroletype import EventRoleType _NARRATIVE = "narrative.css" _NAME_COL = 3 +MAX_IMG_WIDTH=800 # resize images that are wider than this +MAX_IMG_HEIGHT=600 # resize images that are taller than this WIDTH=160 HEIGHT=50 VGAP=10 @@ -1103,8 +1106,26 @@ class MediaPage(BasePage): if mime_type.startswith("image/"): of.write('
\n') if target_exists: - of.write('\n' % newpath) + + of.write('%s\n' % (newpath, self.page_title)) + + if scale <> 1.0: + of.write('\n'); + else: of.write('
(%s)' % _("The file has been moved or deleted")) of.write('
\n')