Fix Progen import to correctly handle AKA surnames (#959)

* Fix Progen import dialog and progress meter for correct parent window

* Fix Progen import to correctly handle AKA surnames

Fixes #11462
This commit is contained in:
Paul Culley 2020-01-09 11:37:31 -06:00 committed by GitHub
parent 9b0cf1b976
commit e6ed0612e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -258,7 +258,8 @@ class ProgenOptions(ManagedWindow):
# display window if GUI active
if self.uistate:
ManagedWindow.__init__(self, self.uistate, [], self.__class__)
ManagedWindow.__init__(self, self.uistate, [], self.__class__,
modal=True)
self._display()
def __on_source_button_toggled(self, widget):
@ -580,6 +581,7 @@ class ProgenOptions(ManagedWindow):
widget.grab_focus()
# creates a modal window and display immediatly!
self.show()
self.glade.toplevel.run()
def _collect(self):

View File

@ -729,7 +729,8 @@ class ProgenParser(UpdateCallback):
# provide feedback about import progress (GUI / TXT)
if self.uistate:
self.progress = ProgressMeter(_("Import from Pro-Gen"), '')
self.progress = ProgressMeter(_("Import from Pro-Gen"), '',
parent=self.uistate.window)
else:
UpdateCallback.__init__(self, user.callback)
@ -1331,9 +1332,10 @@ class ProgenParser(UpdateCallback):
if attr:
person.add_attribute(attr)
else:
self.__add_name(person, citation.handle, NameType.AKA,
' '.join(alias_text[0:-1]),
'', alias_text[-1].split(), '')
self.__add_name(
person, citation.handle if citation else None,
NameType.AKA, ' '.join(alias_text[0:-1]),
'', alias_text[-1], '')
# process F09 Person Code
refn_code = recflds[person_ix[9]] # F09: INDI REFN/INDI CODE