issue #1340, don't display mime-type

svn: r9290
This commit is contained in:
Stéphane Charette 2007-11-03 05:43:12 +00:00
parent 438302d10d
commit 0aefbc706a
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2007-11-02 Stéphane Charette <stephanecharette@gmail.com>
* src/plugins/NarrativeWeb.py: issue #1340, do not display mime-types
in NarrativeWeb for image/*
2007-11-01 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2007-11-01 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* configure.in: We have a runtime check for Python 2.5. Do the same * configure.in: We have a runtime check for Python 2.5. Do the same
here by using AM_PATH_PYTHON(2.5) here by using AM_PATH_PYTHON(2.5)

View File

@ -79,6 +79,7 @@ import Errors
import Utils import Utils
import ThumbNails import ThumbNails
import GrampsLocale import GrampsLocale
import Mime
from QuestionDialog import ErrorDialog, WarningDialog from QuestionDialog import ErrorDialog, WarningDialog
from BasicUtils import name_displayer as _nd from BasicUtils import name_displayer as _nd
from DateHandler import displayer as _dd from DateHandler import displayer as _dd
@ -1147,10 +1148,10 @@ class MediaPage(BasePage):
of.write('<td class="field">%s</td>\n' % _('GRAMPS ID')) of.write('<td class="field">%s</td>\n' % _('GRAMPS ID'))
of.write('<td class="data">%s</td>\n' % photo.gramps_id) of.write('<td class="data">%s</td>\n' % photo.gramps_id)
of.write('</tr>\n') of.write('</tr>\n')
if not note_only: if not note_only and not mime_type.startswith("image/"):
of.write('<tr>\n') of.write('<tr>\n')
of.write('<td class="field">%s</td>\n' % _('File type')) of.write('<td class="field">%s</td>\n' % _('File type'))
of.write('<td class="data">%s</td>\n' % photo.mime) of.write('<td class="data">%s</td>\n' % Mime.get_description(mime_type))
of.write('</tr>\n') of.write('</tr>\n')
date = _dd.display(photo.get_date_object()) date = _dd.display(photo.get_date_object())
if date != "": if date != "":