From d89d56af7153809eaf8bb0eae0a2067bf8ed1d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Charette?= Date: Sat, 3 Nov 2007 05:43:49 +0000 Subject: [PATCH] issue #1340, don't display mime-type svn: r9291 --- ChangeLog | 4 ++++ src/plugins/NarrativeWeb.py | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70974afb4..0eb050932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-02 Stéphane Charette + * src/plugins/NarrativeWeb.py: issue #1340, do not display mime-types + in NarrativeWeb for image/* + 2007-10-31 Jim Sack * src/Gramps.py In run(), skip error-dialog for things like exit(0) such as used when processing command-line operations. diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index 1d698d609..ca30b2c4f 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -75,6 +75,7 @@ import Utils import ImgManip import GrampsLocale import DateHandler +import Mime from QuestionDialog import ErrorDialog, WarningDialog from NameDisplay import displayer as _nd from DateHandler import displayer as _dd @@ -1050,7 +1051,7 @@ class MediaPage(BasePage): of = self.create_link_file(handle,"img") mime_type = photo.get_mime_type() - + if mime_type: note_only = False newpath = self.copy_source_file(handle, photo) @@ -1129,10 +1130,10 @@ class MediaPage(BasePage): of.write('%s\n' % _('GRAMPS ID')) of.write('%s\n' % photo.gramps_id) of.write('\n') - if not note_only: + if not note_only and not mime_type.startswith("image/"): of.write('\n') of.write('%s\n' % _('File type')) - of.write('%s\n' % photo.mime) + of.write('%s\n' % Mime.get_description(mime_type)) of.write('\n') date = _dd.display(photo.get_date_object()) if date != "":