* 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
This commit is contained in:
Don Allingham 2003-07-08 00:42:26 +00:00
parent aa732c16d7
commit 604cb39f5b
5 changed files with 15 additions and 4 deletions

View File

@ -445,7 +445,9 @@ def compare_dates(f,s):
first = f.get_start_date() first = f.get_start_date()
second = s.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) return cmp(first.year,second.year)
elif first.month != second.month: elif first.month != second.month:
return cmp(first.month,second.month) return cmp(first.month,second.month)
@ -454,7 +456,9 @@ def compare_dates(f,s):
else: else:
first = f.get_stop_date() first = f.get_stop_date()
second = s.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) return cmp(first.year,second.year)
elif first.month != second.month: elif first.month != second.month:
return cmp(first.month,second.month) return cmp(first.month,second.month)

View File

@ -922,6 +922,10 @@ class EditPerson:
surname = self.surname_field.get_text() surname = self.surname_field.get_text()
if GrampsCfg.capitalize: if GrampsCfg.capitalize:
surname = surname.upper() surname = surname.upper()
self.birth.setDate(self.bdate.get_text())
self.death.setDate(self.ddate.get_text())
ntype = self.ntype_field.entry.get_text() ntype = self.ntype_field.entry.get_text()
suffix = self.suffix.get_text() suffix = self.suffix.get_text()
prefix = self.prefix.get_text() prefix = self.prefix.get_text()

View File

@ -754,14 +754,14 @@ class FamilyView:
def icelandic(self,val): def icelandic(self,val):
fname = "" fname = ""
if self.person.getGender() == Person.male: if self.person.getGender() == RelLib.Person.male:
fname = self.person.getPrimaryName().getFirstName() fname = self.person.getPrimaryName().getFirstName()
elif self.family: elif self.family:
f = self.family.getFather() f = self.family.getFather()
if f: if f:
fname = f.getPrimaryName().getFirstName() fname = f.getPrimaryName().getFirstName()
if fname: if fname:
fname = string.split(fname)[0] fname = fname.split()[0]
if val == 0: if val == 0:
return "%ssson" % fname return "%ssson" % fname
elif val == 1: elif val == 1:

View File

@ -24,6 +24,7 @@ import RelLib
import os import os
import sort import sort
import Errors import Errors
import string
from intl import gettext as _ from intl import gettext as _
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog

View File

@ -24,6 +24,8 @@ import RelLib
import os import os
import sort import sort
import Errors import Errors
import string
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
from intl import gettext as _ from intl import gettext as _