issue #1340, don't display mime-type

svn: r9291
This commit is contained in:
Stéphane Charette 2007-11-03 05:43:49 +00:00
parent 7a3316e492
commit d89d56af71
2 changed files with 8 additions and 3 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-10-31 Jim Sack <jgsack@san.rr.com> 2007-10-31 Jim Sack <jgsack@san.rr.com>
* src/Gramps.py In run(), skip error-dialog for things like * src/Gramps.py In run(), skip error-dialog for things like
exit(0) such as used when processing command-line operations. exit(0) such as used when processing command-line operations.

View File

@ -75,6 +75,7 @@ import Utils
import ImgManip import ImgManip
import GrampsLocale import GrampsLocale
import DateHandler import DateHandler
import Mime
from QuestionDialog import ErrorDialog, WarningDialog from QuestionDialog import ErrorDialog, WarningDialog
from NameDisplay import displayer as _nd from NameDisplay import displayer as _nd
from DateHandler import displayer as _dd from DateHandler import displayer as _dd
@ -1050,7 +1051,7 @@ class MediaPage(BasePage):
of = self.create_link_file(handle,"img") of = self.create_link_file(handle,"img")
mime_type = photo.get_mime_type() mime_type = photo.get_mime_type()
if mime_type: if mime_type:
note_only = False note_only = False
newpath = self.copy_source_file(handle, photo) newpath = self.copy_source_file(handle, photo)
@ -1129,10 +1130,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 != "":