Set good symbols for marriage, baptism, cremation and burial
This commit is contained in:
parent
d3d51677f9
commit
69261509ee
@ -189,6 +189,8 @@ class RelationshipView(NavigationView):
|
|||||||
self.male = gsfs(self.symbols.SYMBOL_MALE)
|
self.male = gsfs(self.symbols.SYMBOL_MALE)
|
||||||
self.female = gsfs(self.symbols.SYMBOL_FEMALE)
|
self.female = gsfs(self.symbols.SYMBOL_FEMALE)
|
||||||
self.bth = gsfs(self.symbols.SYMBOL_BIRTH)
|
self.bth = gsfs(self.symbols.SYMBOL_BIRTH)
|
||||||
|
self.bptsm = gsfs(self.symbols.SYMBOL_BAPTISM)
|
||||||
|
self.marriage = gsfs(self.symbols.SYMBOL_MARRIAGE)
|
||||||
self.marr = gsfs(self.symbols.SYMBOL_HETEROSEXUAL)
|
self.marr = gsfs(self.symbols.SYMBOL_HETEROSEXUAL)
|
||||||
self.homom = gsfs(self.symbols.SYMBOL_MALE_HOMOSEXUAL)
|
self.homom = gsfs(self.symbols.SYMBOL_MALE_HOMOSEXUAL)
|
||||||
self.homof = gsfs(self.symbols.SYMBOL_LESBIAN)
|
self.homof = gsfs(self.symbols.SYMBOL_LESBIAN)
|
||||||
@ -196,11 +198,15 @@ class RelationshipView(NavigationView):
|
|||||||
self.unmarr = gsfs(self.symbols.SYMBOL_UNMARRIED_PARTNERSHIP)
|
self.unmarr = gsfs(self.symbols.SYMBOL_UNMARRIED_PARTNERSHIP)
|
||||||
death_idx = self.uistate.death_symbol
|
death_idx = self.uistate.death_symbol
|
||||||
self.dth = self.symbols.get_death_symbol_for_char(death_idx)
|
self.dth = self.symbols.get_death_symbol_for_char(death_idx)
|
||||||
|
self.burial = gsfs(self.symbols.SYMBOL_BURIED)
|
||||||
|
self.cremation = gsfs(self.symbols.SYMBOL_CREMATED)
|
||||||
else:
|
else:
|
||||||
gsf = self.symbols.get_symbol_fallback
|
gsf = self.symbols.get_symbol_fallback
|
||||||
self.male = gsf(self.symbols.SYMBOL_MALE)
|
self.male = gsf(self.symbols.SYMBOL_MALE)
|
||||||
self.female = gsf(self.symbols.SYMBOL_FEMALE)
|
self.female = gsf(self.symbols.SYMBOL_FEMALE)
|
||||||
self.bth = gsf(self.symbols.SYMBOL_BIRTH)
|
self.bth = gsf(self.symbols.SYMBOL_BIRTH)
|
||||||
|
self.bptsm = gsf(self.symbols.SYMBOL_BAPTISM)
|
||||||
|
self.marriage = gsf(self.symbols.SYMBOL_MARRIAGE)
|
||||||
self.marr = gsf(self.symbols.SYMBOL_HETEROSEXUAL)
|
self.marr = gsf(self.symbols.SYMBOL_HETEROSEXUAL)
|
||||||
self.homom = gsf(self.symbols.SYMBOL_MALE_HOMOSEXUAL)
|
self.homom = gsf(self.symbols.SYMBOL_MALE_HOMOSEXUAL)
|
||||||
self.homof = gsf(self.symbols.SYMBOL_LESBIAN)
|
self.homof = gsf(self.symbols.SYMBOL_LESBIAN)
|
||||||
@ -208,6 +214,8 @@ class RelationshipView(NavigationView):
|
|||||||
self.unmarr = gsf(self.symbols.SYMBOL_UNMARRIED_PARTNERSHIP)
|
self.unmarr = gsf(self.symbols.SYMBOL_UNMARRIED_PARTNERSHIP)
|
||||||
death_idx = self.symbols.DEATH_SYMBOL_LATIN_CROSS
|
death_idx = self.symbols.DEATH_SYMBOL_LATIN_CROSS
|
||||||
self.dth = self.symbols.get_death_symbol_fallback(death_idx)
|
self.dth = self.symbols.get_death_symbol_fallback(death_idx)
|
||||||
|
self.burial = gsf(self.symbols.SYMBOL_BURIED)
|
||||||
|
self.cremation = gsf(self.symbols.SYMBOL_CREMATED)
|
||||||
|
|
||||||
def font_changed(self):
|
def font_changed(self):
|
||||||
self.reload_symbols()
|
self.reload_symbols()
|
||||||
@ -1353,6 +1361,11 @@ class RelationshipView(NavigationView):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
birth = get_birth_or_fallback(self.dbstate.db, person)
|
birth = get_birth_or_fallback(self.dbstate.db, person)
|
||||||
|
if birth:
|
||||||
|
if birth.get_type() == EventType.BAPTISM:
|
||||||
|
s_birth = self.bptsm
|
||||||
|
else:
|
||||||
|
s_birth = self.bth
|
||||||
if birth and birth.get_type() != EventType.BIRTH:
|
if birth and birth.get_type() != EventType.BIRTH:
|
||||||
sdate = get_date(birth)
|
sdate = get_date(birth)
|
||||||
if sdate:
|
if sdate:
|
||||||
@ -1365,6 +1378,13 @@ class RelationshipView(NavigationView):
|
|||||||
bdate = ""
|
bdate = ""
|
||||||
|
|
||||||
death = get_death_or_fallback(self.dbstate.db, person)
|
death = get_death_or_fallback(self.dbstate.db, person)
|
||||||
|
if death:
|
||||||
|
if death.get_type() == EventType.BURIAL:
|
||||||
|
s_death = self.burial
|
||||||
|
elif death.get_type() == EventType.CREMATION:
|
||||||
|
s_death = self.cremation
|
||||||
|
else:
|
||||||
|
s_death = self.dth
|
||||||
if death and death.get_type() != EventType.DEATH:
|
if death and death.get_type() != EventType.DEATH:
|
||||||
sdate = get_date(death)
|
sdate = get_date(death)
|
||||||
if sdate:
|
if sdate:
|
||||||
@ -1378,15 +1398,15 @@ class RelationshipView(NavigationView):
|
|||||||
|
|
||||||
if bdate and ddate:
|
if bdate and ddate:
|
||||||
value = _("%(birthabbrev)s %(birthdate)s, %(deathabbrev)s %(deathdate)s") % {
|
value = _("%(birthabbrev)s %(birthdate)s, %(deathabbrev)s %(deathdate)s") % {
|
||||||
'birthabbrev': self.bth,
|
'birthabbrev': s_birth,
|
||||||
'deathabbrev': self.dth,
|
'deathabbrev': s_death,
|
||||||
'birthdate' : bdate,
|
'birthdate' : bdate,
|
||||||
'deathdate' : ddate
|
'deathdate' : ddate
|
||||||
}
|
}
|
||||||
elif bdate:
|
elif bdate:
|
||||||
value = _("%(event)s %(date)s") % {'event': self.bth, 'date': bdate}
|
value = _("%(event)s %(date)s") % {'event': s_birth, 'date': bdate}
|
||||||
elif ddate:
|
elif ddate:
|
||||||
value = _("%(event)s %(date)s") % {'event': self.dth, 'date': ddate}
|
value = _("%(event)s %(date)s") % {'event': s_death, 'date': ddate}
|
||||||
else:
|
else:
|
||||||
value = ""
|
value = ""
|
||||||
return value
|
return value
|
||||||
@ -1457,10 +1477,7 @@ class RelationshipView(NavigationView):
|
|||||||
(event_ref.get_role() == EventRoleType.FAMILY or
|
(event_ref.get_role() == EventRoleType.FAMILY or
|
||||||
event_ref.get_role() == EventRoleType.PRIMARY)):
|
event_ref.get_role() == EventRoleType.PRIMARY)):
|
||||||
if event.get_type() == EventType.MARRIAGE:
|
if event.get_type() == EventType.MARRIAGE:
|
||||||
msg = self.marriage_symbol(family, markup=False)
|
etype = self.marriage
|
||||||
etype = msg
|
|
||||||
elif event.get_type() == EventType.DIVORCE:
|
|
||||||
etype = self.divorce
|
|
||||||
elif event.get_type() == EventType.DIVORCE:
|
elif event.get_type() == EventType.DIVORCE:
|
||||||
etype = self.divorce
|
etype = self.divorce
|
||||||
else:
|
else:
|
||||||
@ -1492,19 +1509,19 @@ class RelationshipView(NavigationView):
|
|||||||
if dobj:
|
if dobj:
|
||||||
if pname:
|
if pname:
|
||||||
self.write_data(
|
self.write_data(
|
||||||
vbox, _('%(event_type)s: %(date)s in %(place)s') %
|
vbox, _('%(event_type)s %(date)s in %(place)s') %
|
||||||
value, start_col, stop_col, True)
|
value, start_col, stop_col, True)
|
||||||
else:
|
else:
|
||||||
self.write_data(
|
self.write_data(
|
||||||
vbox, _('%(event_type)s: %(date)s') % value,
|
vbox, _('%(event_type)s %(date)s') % value,
|
||||||
start_col, stop_col)
|
start_col, stop_col)
|
||||||
elif pname:
|
elif pname:
|
||||||
self.write_data(
|
self.write_data(
|
||||||
vbox, _('%(event_type)s: %(place)s') % value,
|
vbox, _('%(event_type)s %(place)s') % value,
|
||||||
start_col, stop_col)
|
start_col, stop_col)
|
||||||
else:
|
else:
|
||||||
self.write_data(
|
self.write_data(
|
||||||
vbox, '%(event_type)s:' % value, start_col, stop_col)
|
vbox, '%(event_type)s' % value, start_col, stop_col)
|
||||||
|
|
||||||
def write_family(self, family_handle, person = None):
|
def write_family(self, family_handle, person = None):
|
||||||
family = self.dbstate.db.get_family_from_handle(family_handle)
|
family = self.dbstate.db.get_family_from_handle(family_handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user