diff --git a/src/Spell.py b/src/Spell.py index 6dd2a583f..9bbd6c26a 100644 --- a/src/Spell.py +++ b/src/Spell.py @@ -56,9 +56,6 @@ try: except ImportError: HAVE_GTKSPELL = False -if not HAVE_GTKSPELL: - LOG.warn(_("Spelling checker is not installed")) - #------------------------------------------------------------------------- # # GRAMPS classes @@ -66,6 +63,9 @@ if not HAVE_GTKSPELL: #------------------------------------------------------------------------- import config +if (not config.get('behavior.ignore-spellcheck')) and (not HAVE_GTKSPELL): + LOG.warn(_("Spelling checker is not installed")) + #------------------------------------------------------------------------- # # Constants diff --git a/src/config.py b/src/config.py index c2afc7833..1210e6f6c 100644 --- a/src/config.py +++ b/src/config.py @@ -139,6 +139,10 @@ register('behavior.date-about-range', 50) register('behavior.date-after-range', 50) register('behavior.date-before-range', 50) register('behavior.generation-depth', 15) +register('behavior.ignore-gexiv2', False) +register('behavior.ignore-osmgpsmap', False) +register('behavior.ignore-spellcheck', False) +register('behavior.ignore-sdn', False) register('behavior.max-age-prob-alive', 110) register('behavior.max-sib-age-diff', 20) register('behavior.min-generation-years', 13) diff --git a/src/gen/lib/calendar.py b/src/gen/lib/calendar.py index bd25d4b77..bfb1a1ca7 100644 --- a/src/gen/lib/calendar.py +++ b/src/gen/lib/calendar.py @@ -581,7 +581,9 @@ try: #TODO maybe alias the other local invented wheels to Calendar convertors except ImportError: - import logging - LOG = logging.getLogger(".calendar") - LOG.warn("sdn not available. " - "Install Calendar with pypi for native Hebrew calendar calculations.") + import config + if not config.get('behavior.ignore-sdn'): + import logging + LOG = logging.getLogger(".calendar") + LOG.warn("sdn not available. " + "Install Calendar with pypi for native Hebrew calendar calculations.") diff --git a/src/gui/configure.py b/src/gui/configure.py index 79d3e5eb7..fdcca3806 100644 --- a/src/gui/configure.py +++ b/src/gui/configure.py @@ -512,6 +512,22 @@ class GrampsPreferences(ConfigureDialog): table, _('Show plugin status dialog on plugin load error.'), 3, 'behavior.pop-plugin-status') + self.add_checkbox( + table, _('Suppress warning when OsmGpsMap not installed.'), + 4, 'behavior.ignore-osmgpsmap') + + self.add_checkbox( + table, _('Suppress warning when pyexiv2 not installed.'), + 5, 'behavior.ignore-gexiv2') + + self.add_checkbox( + table, _('Suppress warning when spell checking not installed.'), + 6, 'behavior.ignore-spellcheck') + + self.add_checkbox( + table, _("Suppress warning when 'sdn' not installed."), + 7, 'behavior.ignore-sdn') + return _('Warnings'), table def _build_name_format_model(self, active): diff --git a/src/plugins/gramplet/bottombar.gpr.py b/src/plugins/gramplet/bottombar.gpr.py index 4f4ee2486..f0eec0479 100644 --- a/src/plugins/gramplet/bottombar.gpr.py +++ b/src/plugins/gramplet/bottombar.gpr.py @@ -86,9 +86,11 @@ try: import pyexiv2 available = True except: - import logging - logging.warning(_("WARNING: pyexiv2 module not loaded. " - "Image metadata functionality will not be available.")) + import config + if not config.get('behavior.ignore-gexiv2'): + import logging + logging.warning(_("WARNING: pyexiv2 module not loaded. " + "Image metadata functionality will not be available.")) available = False if available: diff --git a/src/plugins/view/geography.gpr.py b/src/plugins/view/geography.gpr.py index bd12b2aef..f3b09fd13 100644 --- a/src/plugins/view/geography.gpr.py +++ b/src/plugins/view/geography.gpr.py @@ -38,9 +38,11 @@ try : osmgpsmap.__version__) except: OSMGPSMAP = False - import logging - logging.warning(_("WARNING: osmgpsmap module not loaded. " - "Geography functionality will not be available.")) + import config + if not config.get('behavior.ignore-osmgpsmap'): + import logging + logging.warning(_("WARNING: osmgpsmap module not loaded. " + "Geography functionality will not be available.")) if OSMGPSMAP: # Load the view only if osmgpsmap library is present.