parent
438302d10d
commit
0aefbc706a
@ -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)
|
||||||
|
@ -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
|
||||||
@ -1066,9 +1067,9 @@ class MediaPage(BasePage):
|
|||||||
BasePage.__init__(self, title, options, archive, media_list,
|
BasePage.__init__(self, title, options, archive, media_list,
|
||||||
photo.gramps_id)
|
photo.gramps_id)
|
||||||
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)
|
||||||
@ -1078,11 +1079,11 @@ class MediaPage(BasePage):
|
|||||||
target_exists = False
|
target_exists = False
|
||||||
|
|
||||||
self.copy_thumbnail(handle, photo)
|
self.copy_thumbnail(handle, photo)
|
||||||
|
|
||||||
self.page_title = photo.get_description()
|
self.page_title = photo.get_description()
|
||||||
self.display_header(of,db, "%s - %s" % (_('Gallery'), title),
|
self.display_header(of,db, "%s - %s" % (_('Gallery'), title),
|
||||||
get_researcher().get_name(),up=True)
|
get_researcher().get_name(),up=True)
|
||||||
|
|
||||||
of.write('<div id="summaryarea">\n')
|
of.write('<div id="summaryarea">\n')
|
||||||
of.write('<h3>%s</h3>\n' % self.page_title.strip())
|
of.write('<h3>%s</h3>\n' % self.page_title.strip())
|
||||||
|
|
||||||
@ -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 != "":
|
||||||
|
Loading…
Reference in New Issue
Block a user