From 6e4ce843964d4b9743564c314286198e48cf80bf Mon Sep 17 00:00:00 2001 From: Josip Date: Sat, 16 May 2015 04:19:11 +0200 Subject: [PATCH] Set transient parent for errorview and errorreportassistant --- gramps/gui/logger/_errorreportassistant.py | 9 +++++++++ gramps/gui/logger/_errorview.py | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gramps/gui/logger/_errorreportassistant.py b/gramps/gui/logger/_errorreportassistant.py index cd9fe261d..b66e4b90c 100644 --- a/gramps/gui/logger/_errorreportassistant.py +++ b/gramps/gui/logger/_errorreportassistant.py @@ -89,6 +89,15 @@ 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 diff --git a/gramps/gui/logger/_errorview.py b/gramps/gui/logger/_errorview.py index 878e3bf50..5f0d18cc6 100644 --- a/gramps/gui/logger/_errorview.py +++ b/gramps/gui/logger/_errorview.py @@ -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,7 +135,6 @@ 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)