8128: GtkDialog mapped without a transient parent (*.gpr.py)
This commit is contained in:
@@ -128,7 +128,7 @@ class BasePluginManager:
|
|||||||
# if the path has not already been loaded, save it in the
|
# if the path has not already been loaded, save it in the
|
||||||
# registereddir_list list for use on reloading.
|
# registereddir_list list for use on reloading.
|
||||||
self.__registereddir_set.add(dirpath)
|
self.__registereddir_set.add(dirpath)
|
||||||
self.__pgr.scan_dir(dirpath)
|
self.__pgr.scan_dir(dirpath, uistate=uistate)
|
||||||
|
|
||||||
if load_on_reg:
|
if load_on_reg:
|
||||||
# Run plugins that request to be loaded on startup and
|
# Run plugins that request to be loaded on startup and
|
||||||
|
|||||||
@@ -1108,7 +1108,7 @@ class PluginRegister:
|
|||||||
def add_plugindata(self, plugindata):
|
def add_plugindata(self, plugindata):
|
||||||
self.__plugindata.append(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
|
The dir name will be scanned for plugin registration code, which will
|
||||||
be loaded in :class:`PluginData` objects if they satisfy some checks.
|
be loaded in :class:`PluginData` objects if they satisfy some checks.
|
||||||
@@ -1152,7 +1152,7 @@ class PluginRegister:
|
|||||||
try:
|
try:
|
||||||
#execfile(full_filename,
|
#execfile(full_filename,
|
||||||
exec (compile(stream, filename, 'exec'),
|
exec (compile(stream, filename, 'exec'),
|
||||||
make_environment(_=local_gettext), {})
|
make_environment(_=local_gettext), {'uistate': uistate})
|
||||||
except ValueError as msg:
|
except ValueError as msg:
|
||||||
print(_('ERROR: Failed reading plugin registration %(filename)s') % \
|
print(_('ERROR: Failed reading plugin registration %(filename)s') % \
|
||||||
{'filename' : filename})
|
{'filename' : filename})
|
||||||
|
|||||||
@@ -422,8 +422,9 @@ else:
|
|||||||
message = _("Image metadata functionality will not be available.\n"
|
message = _("Image metadata functionality will not be available.\n"
|
||||||
"To build it for Gramps see "
|
"To build it for Gramps see "
|
||||||
"%(gramps_wiki_build_gexiv2_url)s" % gexiv2_dict )
|
"%(gramps_wiki_build_gexiv2_url)s" % gexiv2_dict )
|
||||||
MessageHideDialog(title, message, # TODO no-parent
|
MessageHideDialog(title, message, # parent-OK
|
||||||
'interface.ignore-gexiv2')
|
'interface.ignore-gexiv2',
|
||||||
|
parent=uistate.window)
|
||||||
|
|
||||||
register(GRAMPLET,
|
register(GRAMPLET,
|
||||||
id="Person Residence",
|
id="Person Residence",
|
||||||
|
|||||||
@@ -72,8 +72,9 @@ if not OSMGPSMAP:
|
|||||||
MESSAGE = _("Geography functionality will not be available.\n"
|
MESSAGE = _("Geography functionality will not be available.\n"
|
||||||
"To build it for Gramps see "
|
"To build it for Gramps see "
|
||||||
"%(gramps_wiki_build_osmgps_url)s") % OSMGPS_DICT
|
"%(gramps_wiki_build_osmgps_url)s") % OSMGPS_DICT
|
||||||
MessageHideDialog(TITLE, MESSAGE, # TODO no-parent
|
MessageHideDialog(TITLE, MESSAGE, # parent-OK
|
||||||
'interface.ignore-osmgpsmap')
|
'interface.ignore-osmgpsmap',
|
||||||
|
parent=uistate.window)
|
||||||
else:
|
else:
|
||||||
# Load the view only if osmgpsmap library is present.
|
# Load the view only if osmgpsmap library is present.
|
||||||
register(VIEW,
|
register(VIEW,
|
||||||
|
|||||||
Reference in New Issue
Block a user