7088: provide a config option to suppress the warning about missing "sdn"

svn: r23207
This commit is contained in:
Paul Franklin 2013-09-26 21:53:03 +00:00
parent 93170f1e2a
commit 3381140ec0
3 changed files with 11 additions and 4 deletions

View File

@ -143,6 +143,7 @@ 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)

View File

@ -580,7 +580,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.")
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.")

View File

@ -621,6 +621,10 @@ class GrampsPreferences(ConfigureDialog):
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):