diff --git a/gramps/gen/plug/_manager.py b/gramps/gen/plug/_manager.py index bfb4712c1..3c694555c 100644 --- a/gramps/gen/plug/_manager.py +++ b/gramps/gen/plug/_manager.py @@ -128,7 +128,7 @@ class BasePluginManager: # if the path has not already been loaded, save it in the # registereddir_list list for use on reloading. self.__registereddir_set.add(dirpath) - self.__pgr.scan_dir(dirpath) + self.__pgr.scan_dir(dirpath, uistate=uistate) if load_on_reg: # Run plugins that request to be loaded on startup and diff --git a/gramps/gen/plug/_pluginreg.py b/gramps/gen/plug/_pluginreg.py index 8be18717d..e914e2e10 100644 --- a/gramps/gen/plug/_pluginreg.py +++ b/gramps/gen/plug/_pluginreg.py @@ -1108,7 +1108,7 @@ class PluginRegister: def add_plugindata(self, plugindata): self.__plugindata.append(plugindata) - def scan_dir(self, dir): + def scan_dir(self, dir, uistate=None): """ The dir name will be scanned for plugin registration code, which will be loaded in :class:`PluginData` objects if they satisfy some checks. @@ -1152,7 +1152,7 @@ class PluginRegister: try: #execfile(full_filename, exec (compile(stream, filename, 'exec'), - make_environment(_=local_gettext), {}) + make_environment(_=local_gettext), {'uistate': uistate}) except ValueError as msg: print(_('ERROR: Failed reading plugin registration %(filename)s') % \ {'filename' : filename}) diff --git a/gramps/plugins/gramplet/gramplet.gpr.py b/gramps/plugins/gramplet/gramplet.gpr.py index 6372a6867..ab7c5ba3e 100644 --- a/gramps/plugins/gramplet/gramplet.gpr.py +++ b/gramps/plugins/gramplet/gramplet.gpr.py @@ -422,8 +422,9 @@ else: message = _("Image metadata functionality will not be available.\n" "To build it for Gramps see " "%(gramps_wiki_build_gexiv2_url)s" % gexiv2_dict ) - MessageHideDialog(title, message, # TODO no-parent - 'interface.ignore-gexiv2') + MessageHideDialog(title, message, # parent-OK + 'interface.ignore-gexiv2', + parent=uistate.window) register(GRAMPLET, id="Person Residence", diff --git a/gramps/plugins/view/geography.gpr.py b/gramps/plugins/view/geography.gpr.py index 30850739f..b163420db 100644 --- a/gramps/plugins/view/geography.gpr.py +++ b/gramps/plugins/view/geography.gpr.py @@ -72,8 +72,9 @@ if not OSMGPSMAP: MESSAGE = _("Geography functionality will not be available.\n" "To build it for Gramps see " "%(gramps_wiki_build_osmgps_url)s") % OSMGPS_DICT - MessageHideDialog(TITLE, MESSAGE, # TODO no-parent - 'interface.ignore-osmgpsmap') + MessageHideDialog(TITLE, MESSAGE, # parent-OK + 'interface.ignore-osmgpsmap', + parent=uistate.window) else: # Load the view only if osmgpsmap library is present. register(VIEW,