Set transient parent for errorview and errorreportassistant

This commit is contained in:
Josip 2015-05-10 21:05:28 +02:00
parent b966ba74af
commit 306ede4e8e
2 changed files with 17 additions and 2 deletions

View File

@ -83,6 +83,14 @@ class ErrorReportAssistant(Gtk.Assistant):
self.build_page4()
self.build_page5()
self.create_page_summary()
try:
self.set_transient_for(self.list_toplevels()[-2])
except IndexError:
self.set_position(Gtk.WindowPosition.CENTER)
self.set_urgency_hint(True)
self.set_keep_above(True)
self.set_default_size(800,-1)
self.show_all()
self.ownthread = ownthread

View File

@ -82,6 +82,13 @@ class ErrorView(object):
def draw_window(self):
title = "%s - Gramps" % _("Error Report")
self.top = Gtk.Dialog(title)
try:
self.top.set_transient_for(self.top.list_toplevels()[-2])
except IndexError:
self.top.set_position(Gtk.WindowPosition.CENTER)
self.top.set_urgency_hint(True)
self.top.set_keep_above(True)
self.top.set_default_size(800,-1)
vbox = self.top.get_content_area()
vbox.set_spacing(5)
self.top.set_border_width(12)
@ -128,9 +135,9 @@ class ErrorView(object):
vbox.pack_start(tb_expander, True, True, 5)
self.top.add_button(Gtk.STOCK_CANCEL,Gtk.ResponseType.CANCEL)
self.top.add_button(_("Report"),Gtk.ResponseType.YES)
self.top.add_button(Gtk.STOCK_HELP,Gtk.ResponseType.HELP)
self.top.show_all()