From bf25a9582bdd76a8d9b7e26e82efeba8d0789068 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 27 Feb 2006 03:29:31 +0000 Subject: [PATCH] * src/EditPerson.py: strip names of trailing whitespace before assigning them svn: r5999 --- gramps2/ChangeLog | 2 ++ gramps2/src/EditPerson.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 872eb56e0..5fc73212f 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2006-02-26 Don Allingham + * src/EditPerson.py: strip names of trailing whitespace before + assigning them * src/plugins/ImportGeneWeb.py: handle people with no firstname or lastname, if encoding fails, attempt and iso-8859-1 conversion diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index b92d3224a..04ce2a6d8 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -1331,7 +1331,7 @@ class EditPerson: """Check to see if any of the data has changed from the orig record""" - surname = unicode(self.surname.get_text()) + surname = unicode(self.surname.get_text().strip()) self.birth_date_object = self.dp.parse(unicode(self.bdate.get_text())) self.death_date_object = self.dp.parse(unicode(self.ddate.get_text())) @@ -1718,14 +1718,14 @@ class EditPerson: self.window.hide() trans = self.db.transaction_begin() - surname = unicode(self.surname.get_text()) - suffix = unicode(self.suffix.get_text()) - prefix = unicode(self.prefix.get_text()) - ntype = unicode(self.ntype_field.child.get_text()) - given = unicode(self.given.get_text()) - nick = unicode(self.nick.get_text()) - title = unicode(self.title.get_text()) - idval = unicode(self.gid.get_text()) + surname = unicode(self.surname.get_text().strip()) + suffix = unicode(self.suffix.get_text().strip()) + prefix = unicode(self.prefix.get_text().strip()) + ntype = unicode(self.ntype_field.child.get_text().strip()) + given = unicode(self.given.get_text().strip()) + nick = unicode(self.nick.get_text().strip()) + title = unicode(self.title.get_text().strip()) + idval = unicode(self.gid.get_text().strip()) name = self.pname