* src/ReportUtils.py: Use new RelLib API
svn: r5645
This commit is contained in:
parent
85fbf617d1
commit
a0c8752fb0
@ -1,3 +1,6 @@
|
|||||||
|
2005-12-30 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
|
* src/ReportUtils.py: Use new RelLib API
|
||||||
|
|
||||||
2005-12-29 Don Allingham <don@gramps-project.org>
|
2005-12-29 Don Allingham <don@gramps-project.org>
|
||||||
* src/GrampsLocale.py: handle platform specific locale issues
|
* src/GrampsLocale.py: handle platform specific locale issues
|
||||||
* src/DateDisplay.py: use GrampsLocale
|
* src/DateDisplay.py: use GrampsLocale
|
||||||
|
@ -814,7 +814,7 @@ _rtype = {
|
|||||||
RelLib.Family.UNMARRIED : _("unmarried"),
|
RelLib.Family.UNMARRIED : _("unmarried"),
|
||||||
RelLib.Family.CIVIL_UNION : _("civil union"),
|
RelLib.Family.CIVIL_UNION : _("civil union"),
|
||||||
RelLib.Family.UNKNOWN : _("Unknown"),
|
RelLib.Family.UNKNOWN : _("Unknown"),
|
||||||
RelLib.Family.OTHER : _("Other"),
|
RelLib.Family.CUSTOM : _("Other"),
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -1305,27 +1305,31 @@ def get_birth_death_strings(database,person,empty_date="",empty_place=""):
|
|||||||
bdate_mod = False
|
bdate_mod = False
|
||||||
ddate_mod = False
|
ddate_mod = False
|
||||||
|
|
||||||
birth_handle = person.get_birth_handle()
|
birth_ref = person.get_birth_ref()
|
||||||
if birth_handle:
|
if birth_ref and birth_ref.ref:
|
||||||
|
birth_handle = birth_ref.ref
|
||||||
birth = database.get_event_from_handle(birth_handle)
|
birth = database.get_event_from_handle(birth_handle)
|
||||||
bdate = DateHandler.get_date(birth)
|
if birth:
|
||||||
bplace_handle = birth.get_place_handle()
|
bdate = DateHandler.get_date(birth)
|
||||||
if bplace_handle:
|
bplace_handle = birth.get_place_handle()
|
||||||
bplace = database.get_place_from_handle(bplace_handle).get_title()
|
if bplace_handle:
|
||||||
bdate_obj = birth.get_date_object()
|
bplace = database.get_place_from_handle(bplace_handle).get_title()
|
||||||
bdate_full = bdate_obj and bdate_obj.get_day_valid()
|
bdate_obj = birth.get_date_object()
|
||||||
bdate_mod = bdate_obj and bdate_obj.get_modifier() != Date.MOD_NONE
|
bdate_full = bdate_obj and bdate_obj.get_day_valid()
|
||||||
|
bdate_mod = bdate_obj and bdate_obj.get_modifier() != Date.MOD_NONE
|
||||||
|
|
||||||
death_handle = person.get_death_handle()
|
death_ref = person.get_death_ref()
|
||||||
if death_handle:
|
if death_ref and death_ref.ref:
|
||||||
|
death_handle = death_ref.ref
|
||||||
death = database.get_event_from_handle(death_handle)
|
death = database.get_event_from_handle(death_handle)
|
||||||
ddate = DateHandler.get_date(death)
|
if death:
|
||||||
dplace_handle = death.get_place_handle()
|
ddate = DateHandler.get_date(death)
|
||||||
if dplace_handle:
|
dplace_handle = death.get_place_handle()
|
||||||
dplace = database.get_place_from_handle(dplace_handle).get_title()
|
if dplace_handle:
|
||||||
ddate_obj = death.get_date_object()
|
dplace = database.get_place_from_handle(dplace_handle).get_title()
|
||||||
ddate_full = ddate_obj and ddate_obj.get_day_valid()
|
ddate_obj = death.get_date_object()
|
||||||
ddate_mod = ddate_obj and ddate_obj.get_modifier() != Date.MOD_NONE
|
ddate_full = ddate_obj and ddate_obj.get_day_valid()
|
||||||
|
ddate_mod = ddate_obj and ddate_obj.get_modifier() != Date.MOD_NONE
|
||||||
|
|
||||||
return (bdate,bplace,bdate_full,bdate_mod,ddate,dplace,ddate_full,ddate_mod)
|
return (bdate,bplace,bdate_full,bdate_mod,ddate,dplace,ddate_full,ddate_mod)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user