diff --git a/gramps/gen/config.py b/gramps/gen/config.py index 054472d67..f199c5700 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -214,6 +214,7 @@ register('interface.grampletbar-close', False) register('interface.height', 500) register('interface.ignore-gexiv2', False) register('interface.ignore-osmgpsmap', False) +register('interface.ignore-webkit', False) register('interface.lds-height', 450) register('interface.lds-width', 600) register('interface.location-height', 250) diff --git a/gramps/plugins/view/htmlrenderer.gpr.py b/gramps/plugins/view/htmlrenderer.gpr.py index 6968e3223..8a64ac61d 100644 --- a/gramps/plugins/view/htmlrenderer.gpr.py +++ b/gramps/plugins/view/htmlrenderer.gpr.py @@ -58,10 +58,19 @@ if repository.enumerate_versions("WebKit"): TOOLKIT = WEBKIT except: pass -else: - _LOG.warning("Webkit module not loaded. " - "Embedded web page viewing will not be available. " - "Use your package manager to install gir1.2-webkit-3.0"); + +from gramps.gen.config import config +if TOOLKIT == NOWEB and not config.get('interface.ignore-webkit'): + from gramps.gen.constfunc import has_display, mac, win + if win() or mac(): # WebKit is not put into either Windows or Mac bundles + config.set('interface.ignore-webkit', True) + if has_display() and not config.get('interface.ignore-webkit'): + from gramps.gui.dialog import MessageHideDialog + title = _("Webkit module not loaded.") + msg = _("Webkit module not loaded. " + "Embedded web page viewing will not be available. " + "Use your package manager to install gir1.2-webkit-3.0") + MessageHideDialog(title, msg, 'interface.ignore-webkit') #no interfaces present, we do not register these plugins if not (TOOLKIT == NOWEB):