From e5a929c8b336f1c4ac3f94f900866c76e6dce0fa Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 28 Sep 2013 14:00:49 +0000 Subject: [PATCH] Revert change to suppress warnings svn: r23218 --- gramps/gen/config.py | 4 ---- gramps/gen/lib/calendar.py | 10 ++++------ gramps/gui/configure.py | 16 ---------------- gramps/gui/spell.py | 14 +++++++------- gramps/plugins/gramplet/gramplet.gpr.py | 16 +++++++--------- gramps/plugins/view/geography.gpr.py | 14 ++++++-------- 6 files changed, 24 insertions(+), 50 deletions(-) diff --git a/gramps/gen/config.py b/gramps/gen/config.py index af3c73789..11fe37a7e 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -140,10 +140,6 @@ 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/gramps/gen/lib/calendar.py b/gramps/gen/lib/calendar.py index f8bd9376d..1ea01bc06 100644 --- a/gramps/gen/lib/calendar.py +++ b/gramps/gen/lib/calendar.py @@ -580,9 +580,7 @@ try: #TODO maybe alias the other local invented wheels to Calendar convertors except ImportError: - from gramps.gen.config 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.") + import logging + LOG = logging.getLogger(".calendar") + LOG.warn("sdn not available. " + "Install Calendar with pypi for native Hebrew calendar calculations.") diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 30d708968..3b80153c4 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -609,22 +609,6 @@ 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 GExiv2 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/gramps/gui/spell.py b/gramps/gui/spell.py index bfa24c60d..8f7a5f34c 100644 --- a/gramps/gui/spell.py +++ b/gramps/gui/spell.py @@ -70,6 +70,13 @@ elif repository.enumerate_versions("Gtkspell"): except: pass +if not HAVE_GTKSPELL: + LOG.warning(_("GtkSpell not loaded. " + "Spell checking will not be available.\n" + "To build it for Gramps see http://www.gramps-project.org/" + "wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_" + "Conversion#Spell_Check_Install")) + #------------------------------------------------------------------------- # # GRAMPS classes @@ -77,13 +84,6 @@ elif repository.enumerate_versions("Gtkspell"): #------------------------------------------------------------------------- from gramps.gen.config import config -if (not config.get('behavior.ignore-spellcheck')) and (not HAVE_GTKSPELL): - LOG.warning(_("GtkSpell not loaded. " - "Spell checking will not be available.\n" - "To build it for Gramps see http://www.gramps-project.org/" - "wiki/index.php?title=GEPS_029:_GTK3-GObject_introspection_" - "Conversion#Spell_Check_Install")) - #------------------------------------------------------------------------- # # Constants diff --git a/gramps/plugins/gramplet/gramplet.gpr.py b/gramps/plugins/gramplet/gramplet.gpr.py index ce4d8abad..4a44b3f63 100644 --- a/gramps/plugins/gramplet/gramplet.gpr.py +++ b/gramps/plugins/gramplet/gramplet.gpr.py @@ -388,15 +388,13 @@ if available: navtypes=["Media"], ) else: - from gramps.gen.config import config - if not config.get('behavior.ignore-gexiv2'): - import logging - logging.warning(_("GExiv2 module not loaded. Image metadata " - "functionality will not be available.\n" - "To build it for Gramps see " - "http://www.gramps-project.org/wiki/index.php?" - "title=GEPS_029:_GTK3-GObject_introspection" - "_Conversion#GExiv2_for_Image_metadata")) + import logging + logging.warning(_("GExiv2 module not loaded. Image metadata " + "functionality will not be available.\n" + "To build it for Gramps see " + "http://www.gramps-project.org/wiki/index.php?" + "title=GEPS_029:_GTK3-GObject_introspection" + "_Conversion#GExiv2_for_Image_metadata")) register(GRAMPLET, id="Person Residence", diff --git a/gramps/plugins/view/geography.gpr.py b/gramps/plugins/view/geography.gpr.py index 53dafd405..890d60a54 100644 --- a/gramps/plugins/view/geography.gpr.py +++ b/gramps/plugins/view/geography.gpr.py @@ -58,14 +58,12 @@ if repository.enumerate_versions("OsmGpsMap"): pass if not OSMGPSMAP: - from gramps.gen.config import config - if not config.get('behavior.ignore-osmgpsmap'): - _LOG.warning(_("OsmGpsMap module not loaded. " - "Geography functionality will not be available.\n" - "To build it for Gramps see " - "http://www.gramps-project.org/wiki/index.php?" - "title=GEPS_029:_GTK3-GObject_introspection_Conversion" - "#OsmGpsMap_for_Geography")) + _LOG.warning(_("OsmGpsMap module not loaded. " + "Geography functionality will not be available.\n" + "To build it for Gramps see " + "http://www.gramps-project.org/wiki/index.php?" + "title=GEPS_029:_GTK3-GObject_introspection_Conversion" + "#OsmGpsMap_for_Geography")) else: # Load the view only if osmgpsmap library is present. register(VIEW,