8128: GtkDialog mapped without a transient parent (*.gpr.py)
This commit is contained in:
parent
f9e9f1be67
commit
5140e97dbd
@ -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
|
||||
|
@ -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})
|
||||
|
@ -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",
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user