Merge pull request #214 from prculley/dialog

Bug 8128 for importgedcom and libgedcom; dialog parent=
This commit is contained in:
Paul Franklin 2016-08-03 02:44:19 +00:00 committed by GitHub
commit ab32d53575
2 changed files with 4 additions and 2 deletions

View File

@ -98,6 +98,7 @@ def importData(database, filename, user):
code = top.get_object('codeset')
code.set_active(0)
dialog = top.toplevel
dialog.set_transient_for(user.uistate.window)
dialog.run()
enc = ['ANSEL', 'ANSEL', 'ANSI', 'ASCII', 'UTF-8']
code_set = enc[ code.get_active()]

View File

@ -7301,11 +7301,12 @@ class GedcomParser(UpdateCallback):
# coding is now wrong.
if self.genby.upper() == "LEGACY":
fname = os.path.basename(self.filename)
WarningDialog( # no-parent
WarningDialog( # parent-OK
_("Import of GEDCOM file %(filename)s with DEST=%(by)s, "
"could cause errors in the resulting database!")
% {'filename': fname, 'by': self.genby},
_("Look for nameless events.")
_("Look for nameless events."),
parent=self.user.uistate.window
)
def __header_char(self, line, state):