Fix export assistant, proper parent for popup progress and dialog
This commit is contained in:
parent
99b7fc8815
commit
a860a9d80b
@ -274,7 +274,8 @@ class ExportAssistant(ManagedWindow, Gtk.Assistant):
|
|||||||
# add new content
|
# add new content
|
||||||
if config_box_class:
|
if config_box_class:
|
||||||
self.option_box_instance = 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()
|
box = self.option_box_instance.get_option_box()
|
||||||
vbox.add(box)
|
vbox.add(box)
|
||||||
else:
|
else:
|
||||||
|
@ -62,11 +62,11 @@ class Progress:
|
|||||||
Mirros the same interface that the ExportAssistant uses in the
|
Mirros the same interface that the ExportAssistant uses in the
|
||||||
selection, but this is for the preview selection.
|
selection, but this is for the preview selection.
|
||||||
"""
|
"""
|
||||||
def __init__(self, uistate):
|
def __init__(self, parent):
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
self.pm = ProgressMeter(_("Selecting Preview Data"),
|
self.pm = ProgressMeter(_("Selecting Preview Data"),
|
||||||
_('Selecting...'),
|
_('Selecting...'),
|
||||||
parent=uistate.window)
|
parent=parent)
|
||||||
self.progress_cnt = 0
|
self.progress_cnt = 0
|
||||||
self.title = _("Selecting...")
|
self.title = _("Selecting...")
|
||||||
while Gtk.events_pending():
|
while Gtk.events_pending():
|
||||||
@ -106,11 +106,12 @@ class WriterOptionBox:
|
|||||||
the options.
|
the options.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, person, dbstate, uistate, track=[]):
|
def __init__(self, person, dbstate, uistate, track=[], window=None):
|
||||||
self.person = person
|
self.person = person
|
||||||
self.dbstate = dbstate
|
self.dbstate = dbstate
|
||||||
self.uistate = uistate
|
self.uistate = uistate
|
||||||
self.track = track
|
self.track = track
|
||||||
|
self.window = window
|
||||||
self.preview_dbase = None
|
self.preview_dbase = None
|
||||||
self.preview_button = None
|
self.preview_button = None
|
||||||
self.preview_proxy_button = {}
|
self.preview_proxy_button = {}
|
||||||
@ -256,7 +257,7 @@ class WriterOptionBox:
|
|||||||
Calculate previews to see the selected data.
|
Calculate previews to see the selected data.
|
||||||
"""
|
"""
|
||||||
self.parse_options()
|
self.parse_options()
|
||||||
pm = Progress(self.uistate)
|
pm = Progress(self.window)
|
||||||
self.preview_dbase = self.get_filtered_database(self.dbstate.db, pm, preview=True)
|
self.preview_dbase = self.get_filtered_database(self.dbstate.db, pm, preview=True)
|
||||||
pm.close()
|
pm.close()
|
||||||
self.preview_button.set_sensitive(0)
|
self.preview_button.set_sensitive(0)
|
||||||
@ -673,7 +674,7 @@ class WriterOptionBox:
|
|||||||
from ...dialog import ErrorDialog
|
from ...dialog import ErrorDialog
|
||||||
ErrorDialog(_("Cannot edit a system filter"),
|
ErrorDialog(_("Cannot edit a system filter"),
|
||||||
_("Please select a different filter to edit"),
|
_("Please select a different filter to edit"),
|
||||||
parent=self.uistate.window)
|
parent=self.window)
|
||||||
|
|
||||||
def edit_filter_save(self, filterdb, namespace):
|
def edit_filter_save(self, filterdb, namespace):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user