From a860a9d80b6c4ccfb4ceb828450ab5498d626c37 Mon Sep 17 00:00:00 2001 From: prculley Date: Tue, 17 Jan 2017 08:49:21 -0600 Subject: [PATCH] Fix export assistant, proper parent for popup progress and dialog --- gramps/gui/plug/export/_exportassistant.py | 3 ++- gramps/gui/plug/export/_exportoptions.py | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gramps/gui/plug/export/_exportassistant.py b/gramps/gui/plug/export/_exportassistant.py index fdad88e3b..8d2040d60 100644 --- a/gramps/gui/plug/export/_exportassistant.py +++ b/gramps/gui/plug/export/_exportassistant.py @@ -274,7 +274,8 @@ class ExportAssistant(ManagedWindow, Gtk.Assistant): # add new content if config_box_class: self.option_box_instance = config_box_class( - self.person, self.dbstate, self.uistate, track=self.track) + self.person, self.dbstate, self.uistate, track=self.track, + window=self.window) box = self.option_box_instance.get_option_box() vbox.add(box) else: diff --git a/gramps/gui/plug/export/_exportoptions.py b/gramps/gui/plug/export/_exportoptions.py index ce0796393..6ce2fc379 100644 --- a/gramps/gui/plug/export/_exportoptions.py +++ b/gramps/gui/plug/export/_exportoptions.py @@ -62,11 +62,11 @@ class Progress: Mirros the same interface that the ExportAssistant uses in the selection, but this is for the preview selection. """ - def __init__(self, uistate): + def __init__(self, parent): from gi.repository import Gtk self.pm = ProgressMeter(_("Selecting Preview Data"), _('Selecting...'), - parent=uistate.window) + parent=parent) self.progress_cnt = 0 self.title = _("Selecting...") while Gtk.events_pending(): @@ -106,11 +106,12 @@ class WriterOptionBox: the options. """ - def __init__(self, person, dbstate, uistate, track=[]): + def __init__(self, person, dbstate, uistate, track=[], window=None): self.person = person self.dbstate = dbstate self.uistate = uistate self.track = track + self.window = window self.preview_dbase = None self.preview_button = None self.preview_proxy_button = {} @@ -256,7 +257,7 @@ class WriterOptionBox: Calculate previews to see the selected data. """ self.parse_options() - pm = Progress(self.uistate) + pm = Progress(self.window) self.preview_dbase = self.get_filtered_database(self.dbstate.db, pm, preview=True) pm.close() self.preview_button.set_sensitive(0) @@ -673,7 +674,7 @@ class WriterOptionBox: from ...dialog import ErrorDialog ErrorDialog(_("Cannot edit a system filter"), _("Please select a different filter to edit"), - parent=self.uistate.window) + parent=self.window) def edit_filter_save(self, filterdb, namespace): """