From 5384b63ffab3db36e2f684c383224d34772823b3 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 8 Jul 2003 00:42:26 +0000 Subject: [PATCH] * src/plugins/DetAncestralReport.py: add import of string * src/plugins/DetDescendantReport.py: add import of string * src/Date.py: compare date modes when comparing dates * src/EditPerson.py: save date strings which comparing for changes * src/FamilyView.py: Scope Person.male properly svn: r1839 --- gramps2/src/Date.py | 8 ++++++-- gramps2/src/EditPerson.py | 4 ++++ gramps2/src/FamilyView.py | 4 ++-- gramps2/src/plugins/DetAncestralReport.py | 1 + gramps2/src/plugins/DetDescendantReport.py | 2 ++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gramps2/src/Date.py b/gramps2/src/Date.py index a9e8f5bfa..978367d06 100644 --- a/gramps2/src/Date.py +++ b/gramps2/src/Date.py @@ -445,7 +445,9 @@ def compare_dates(f,s): first = f.get_start_date() second = s.get_start_date() - if first.year != second.year: + if first.mode != second.mode: + return 1 + elif first.year != second.year: return cmp(first.year,second.year) elif first.month != second.month: return cmp(first.month,second.month) @@ -454,7 +456,9 @@ def compare_dates(f,s): else: first = f.get_stop_date() second = s.get_stop_date() - if first.year != second.year: + if first.mode != second.mode: + return 1 + elif first.year != second.year: return cmp(first.year,second.year) elif first.month != second.month: return cmp(first.month,second.month) diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index 0e752e502..7516cb6bd 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -922,6 +922,10 @@ class EditPerson: surname = self.surname_field.get_text() if GrampsCfg.capitalize: surname = surname.upper() + + self.birth.setDate(self.bdate.get_text()) + self.death.setDate(self.ddate.get_text()) + ntype = self.ntype_field.entry.get_text() suffix = self.suffix.get_text() prefix = self.prefix.get_text() diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py index 332d521d7..023eed4b6 100644 --- a/gramps2/src/FamilyView.py +++ b/gramps2/src/FamilyView.py @@ -754,14 +754,14 @@ class FamilyView: def icelandic(self,val): fname = "" - if self.person.getGender() == Person.male: + if self.person.getGender() == RelLib.Person.male: fname = self.person.getPrimaryName().getFirstName() elif self.family: f = self.family.getFather() if f: fname = f.getPrimaryName().getFirstName() if fname: - fname = string.split(fname)[0] + fname = fname.split()[0] if val == 0: return "%ssson" % fname elif val == 1: diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index db20974e1..c758feb6a 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -24,6 +24,7 @@ import RelLib import os import sort import Errors +import string from intl import gettext as _ from QuestionDialog import ErrorDialog diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index 0be7e914a..a02057a28 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -24,6 +24,8 @@ import RelLib import os import sort import Errors +import string + from QuestionDialog import ErrorDialog from intl import gettext as _