Disable loading of pyexiv2 - see bug #6042

svn: r20374
This commit is contained in:
Nick Hall 2012-09-12 21:35:11 +00:00
parent 078c5eda3f
commit 6708e3b6b5
2 changed files with 44 additions and 42 deletions

View File

@ -329,7 +329,7 @@ class SystemFonts(object):
""" """
if SystemFonts.__FONTS is None: if SystemFonts.__FONTS is None:
families = PangoCairo.font_map_get_default().list_families() families = PangoCairo.font_map_get_default().list_families()
print ('GRAMPS GTK3: a g_value_get_object warning:') #print ('GRAMPS GTK3: a g_value_get_object warning:')
SystemFonts.__FONTS = [family.get_name() for family in families] SystemFonts.__FONTS = [family.get_name() for family in families]
SystemFonts.__FONTS.sort() SystemFonts.__FONTS.sort()

View File

@ -296,25 +296,26 @@ register(GRAMPLET,
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# Edit Image Exif Metadata class # Edit Image Exif Metadata class
#------------------------------------------------------------------------ #------------------------------------------------------------------------
register(GRAMPLET, # GTK3 TODO: The pyexiv2 module causes problems - see bug #6042
id = "Edit Image Exif Metadata", #register(GRAMPLET,
name = _("Edit Image Exif Metadata"), #id = "Edit Image Exif Metadata",
description = _("Gramplet to view, edit, and save image Exif metadata"), #name = _("Edit Image Exif Metadata"),
height = 450, #description = _("Gramplet to view, edit, and save image Exif metadata"),
expand = False, #height = 450,
gramplet = 'EditExifMetadata', #expand = False,
gramplet_title = _("Edit Exif Metadata"), #gramplet = 'EditExifMetadata',
detached_width = 510, #gramplet_title = _("Edit Exif Metadata"),
detached_height = 550, #detached_width = 510,
version = '1.5.0', #detached_height = 550,
gramps_target_version = '4.0', #version = '1.5.0',
status = STABLE, #gramps_target_version = '4.0',
fname = "editexifmetadata.py", #status = STABLE,
help_url = "Edit Image Exif Metadata", #fname = "editexifmetadata.py",
authors = ['Rob G. Healey'], #help_url = "Edit Image Exif Metadata",
authors_email = ['robhealey1@gmail.com'], #authors = ['Rob G. Healey'],
navtypes = ["Media"], #authors_email = ['robhealey1@gmail.com'],
) #navtypes = ["Media"],
#)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# Bottombar # Bottombar
@ -375,29 +376,30 @@ register(GRAMPLET,
navtypes=["Media"], navtypes=["Media"],
) )
try: # GTK3 TODO: The pyexiv2 module causes problems - see bug #6042
import pyexiv2 #try:
available = True #import pyexiv2
except: #available = True
import logging #except:
logging.warning(_("WARNING: pyexiv2 module not loaded. " #import logging
"Image metadata functionality will not be available.")) #logging.warning(_("WARNING: pyexiv2 module not loaded. "
available = False #"Image metadata functionality will not be available."))
#available = False
if available: #if available:
register(GRAMPLET, #register(GRAMPLET,
id = "Metadata Viewer", #id = "Metadata Viewer",
name = _("Metadata Viewer"), #name = _("Metadata Viewer"),
description = _("Gramplet showing metadata for a media object"), #description = _("Gramplet showing metadata for a media object"),
version = "1.0.0", #version = "1.0.0",
gramps_target_version = "4.0", #gramps_target_version = "4.0",
status = STABLE, #status = STABLE,
fname = "metadataviewer.py", #fname = "metadataviewer.py",
height = 200, #height = 200,
gramplet = 'MetadataViewer', #gramplet = 'MetadataViewer',
gramplet_title = _("Image Metadata"), #gramplet_title = _("Image Metadata"),
navtypes=["Media"], #navtypes=["Media"],
) #)
register(GRAMPLET, register(GRAMPLET,
id="Person Residence", id="Person Residence",