From 0f652ce5ef61b543eb0ac241fffe4b24f468c505 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 9 Sep 2013 20:55:05 +0000 Subject: [PATCH] enable suppression of minor missing-package warning (spell checking) svn: r23069 --- gramps/gen/config.py | 1 + gramps/gui/configure.py | 4 ++++ gramps/gui/spell.py | 14 +++++++------- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gramps/gen/config.py b/gramps/gen/config.py index 01d95f5ec..8ad890779 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -142,6 +142,7 @@ 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.max-age-prob-alive', 110) register('behavior.max-sib-age-diff', 20) register('behavior.min-generation-years', 13) diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 78a18d8a4..5f64fadcd 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -617,6 +617,10 @@ class GrampsPreferences(ConfigureDialog): 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') + return _('Warnings'), table def _build_name_format_model(self, active): diff --git a/gramps/gui/spell.py b/gramps/gui/spell.py index 8f7a5f34c..bfa24c60d 100644 --- a/gramps/gui/spell.py +++ b/gramps/gui/spell.py @@ -70,13 +70,6 @@ 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 @@ -84,6 +77,13 @@ if not HAVE_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