6548: 'Available Gramps Updates for Addons' window not on top

This commit is contained in:
Josip 2015-01-03 18:02:27 +01:00
parent f626cb9d0a
commit 479992935c
3 changed files with 7 additions and 5 deletions

View File

@ -1330,7 +1330,8 @@ class GrampsPreferences(ConfigureDialog):
if len(addon_update_list) > 0:
try:
PluginWindows.UpdateAddons(self.uistate, [], addon_update_list)
PluginWindows.UpdateAddons(self.uistate, [], addon_update_list,
parent=self.window)
except WindowActiveError:
pass
else:

View File

@ -1070,7 +1070,7 @@ class ToolManagedWindow(tool.Tool, ToolManagedWindowBase):
#-------------------------------------------------------------------------
class UpdateAddons(ManagedWindow):
def __init__(self, uistate, track, addon_update_list):
def __init__(self, uistate, track, addon_update_list, parent=None):
self.title = _('Available Gramps Updates for Addons')
ManagedWindow.__init__(self, uistate, track, self.__class__)
@ -1080,8 +1080,8 @@ class UpdateAddons(ManagedWindow):
self.title)
self.window.set_size_request(750, 400)
if win() and Gtk.get_minor_version() < 11:
self.window.set_transient_for(self.window.get_toplevel())
if win():
self.window.set_transient_for(parent)
apply_button = glade.get_object('apply')
cancel_button = glade.get_object('cancel')

View File

@ -344,7 +344,8 @@ class ViewManager(CLIManager):
Called when add-on updates are available.
"""
try:
PluginWindows.UpdateAddons(self.uistate, [], addon_update_list)
PluginWindows.UpdateAddons(self.uistate, [], addon_update_list,
parent=self.window)
except WindowActiveError:
pass