* src/plugins/DetDescendantReport.py: Use callname instead of nickname (#0000557)
* src/plugins/DetAncestralReport.py: Use callname instead of nickname (#0000557) * src/ReportBase/_ReportUtils.py: Use callname instead of nickname (#0000557) svn: r7657
This commit is contained in:
parent
1be7bf07c1
commit
e6edf76240
@ -1,3 +1,8 @@
|
||||
2006-11-20 Brian Matherly <brian@gramps-project.org>
|
||||
* src/plugins/DetDescendantReport.py: Use callname instead of nickname (#0000557)
|
||||
* src/plugins/DetAncestralReport.py: Use callname instead of nickname (#0000557)
|
||||
* src/ReportBase/_ReportUtils.py: Use callname instead of nickname (#0000557)
|
||||
|
||||
2006-11-20 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/RelLib/_Family.py (get_sourcref_child_list): The ChildRefs were missing
|
||||
here. This now removes deleted Sources from ChildRefs.
|
||||
|
@ -2222,9 +2222,9 @@ def old_calc_age(database,person):
|
||||
return (age,units)
|
||||
|
||||
|
||||
def common_name(person,use_nick=False):
|
||||
if use_nick and person.get_nick_name():
|
||||
return person.get_nick_name()
|
||||
def common_name(person,use_call=False):
|
||||
if use_call and person.get_primary_name().get_call_name():
|
||||
return person.get_primary_name().get_call_name()
|
||||
else:
|
||||
return person.get_primary_name().get_first_name()
|
||||
|
||||
|
@ -104,7 +104,7 @@ class DetAncestorReport(Report):
|
||||
self.fullDate = options_class.handler.options_dict['fulldates']
|
||||
self.listChildren = options_class.handler.options_dict['listc']
|
||||
self.includeNotes = options_class.handler.options_dict['incnotes']
|
||||
self.usenick = options_class.handler.options_dict['usenick']
|
||||
self.usecall = options_class.handler.options_dict['usecall']
|
||||
self.blankPlace = options_class.handler.options_dict['repplace']
|
||||
self.blankDate = options_class.handler.options_dict['repdate']
|
||||
self.calcAgeFlag = options_class.handler.options_dict['computeage']
|
||||
@ -232,7 +232,7 @@ class DetAncestorReport(Report):
|
||||
|
||||
# Check birth record
|
||||
|
||||
first = ReportUtils.common_name(person,self.usenick)
|
||||
first = ReportUtils.common_name(person,self.usecall)
|
||||
text = ReportUtils.born_str(self.database,person,first,
|
||||
self.EMPTY_DATE,self.EMPTY_PLACE)
|
||||
if text:
|
||||
@ -260,7 +260,7 @@ class DetAncestorReport(Report):
|
||||
if text:
|
||||
self.doc.write_text(text)
|
||||
|
||||
first = ReportUtils.common_name(person,self.usenick)
|
||||
first = ReportUtils.common_name(person,self.usecall)
|
||||
|
||||
self.write_parents(person, first)
|
||||
self.write_marriage(person)
|
||||
@ -500,7 +500,7 @@ class DetAncestorReport(Report):
|
||||
ind = self.database.get_person_from_handle(ind_handle)
|
||||
person_name = _nd.display(ind)
|
||||
person_mark = ReportUtils.get_person_mark(self.database,ind)
|
||||
firstName = ReportUtils.common_name(ind,self.usenick)
|
||||
firstName = ReportUtils.common_name(ind,self.usecall)
|
||||
|
||||
for event_ref in ind.get_event_ref_list():
|
||||
event = self.database.get_event_from_handle(event_ref.ref)
|
||||
@ -668,7 +668,7 @@ class DetAncestorOptions(ReportOptions):
|
||||
'fulldates' : 1,
|
||||
'listc' : 1,
|
||||
'incnotes' : 1,
|
||||
'usenick' : 1,
|
||||
'usecall' : 1,
|
||||
'repplace' : 0,
|
||||
'repdate' : 0,
|
||||
'computeage' : 1,
|
||||
@ -689,8 +689,8 @@ class DetAncestorOptions(ReportOptions):
|
||||
'incnotes' : ("=0/1","Whether to include notes.",
|
||||
["Do not include notes","Include notes"],
|
||||
True),
|
||||
'usenick' : ("=0/1","Whether to use the nick name as the first name.",
|
||||
["Do not use nick name","Use nick name"],
|
||||
'usecall' : ("=0/1","Whether to use the call name as the first name.",
|
||||
["Do not use call name","Use call name"],
|
||||
True),
|
||||
'repplace' : ("=0/1","Whether to replace missing Places with blanks.",
|
||||
["Do not replace missing Places","Replace missing Places"],
|
||||
@ -849,9 +849,9 @@ class DetAncestorOptions(ReportOptions):
|
||||
self.include_notes_option = gtk.CheckButton(_("Include notes"))
|
||||
self.include_notes_option.set_active(self.options_dict['incnotes'])
|
||||
|
||||
# Print nickname
|
||||
self.usenick = gtk.CheckButton(_("Use nickname for common name"))
|
||||
self.usenick.set_active(self.options_dict['usenick'])
|
||||
# Print callname
|
||||
self.usecall = gtk.CheckButton(_("Use callname for common name"))
|
||||
self.usecall.set_active(self.options_dict['usecall'])
|
||||
|
||||
# Replace missing Place with ___________
|
||||
self.place_option = gtk.CheckButton(_("Replace missing places with ______"))
|
||||
@ -893,7 +893,7 @@ class DetAncestorOptions(ReportOptions):
|
||||
# if you want to put everyting in the generic "Options" category, use
|
||||
# self.add_option(text,widget) instead of self.add_frame_option(category,text,widget)
|
||||
|
||||
dialog.add_frame_option(_('Content'),'',self.usenick)
|
||||
dialog.add_frame_option(_('Content'),'',self.usecall)
|
||||
dialog.add_frame_option(_('Content'),'',self.full_date_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.list_children_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.age_option)
|
||||
@ -915,7 +915,7 @@ class DetAncestorOptions(ReportOptions):
|
||||
self.options_dict['fulldates'] = int(self.full_date_option.get_active())
|
||||
self.options_dict['listc'] = int(self.list_children_option.get_active())
|
||||
self.options_dict['incnotes'] = int(self.include_notes_option.get_active())
|
||||
self.options_dict['usenick'] = int(self.usenick.get_active())
|
||||
self.options_dict['usecall'] = int(self.usecall.get_active())
|
||||
self.options_dict['repplace'] = int(self.place_option.get_active())
|
||||
self.options_dict['repdate'] = int(self.date_option.get_active())
|
||||
self.options_dict['computeage'] = int(self.age_option.get_active())
|
||||
|
@ -107,7 +107,7 @@ class DetDescendantReport(Report):
|
||||
self.fullDate = options_class.handler.options_dict['fulldates']
|
||||
self.listChildren = options_class.handler.options_dict['listc']
|
||||
self.includeNotes = options_class.handler.options_dict['incnotes']
|
||||
self.usenick = options_class.handler.options_dict['usenick']
|
||||
self.usecall = options_class.handler.options_dict['usecall']
|
||||
self.blankPlace = options_class.handler.options_dict['repplace']
|
||||
self.blankDate = options_class.handler.options_dict['repdate']
|
||||
self.calcAgeFlag = options_class.handler.options_dict['computeage']
|
||||
@ -259,7 +259,7 @@ class DetDescendantReport(Report):
|
||||
|
||||
# Check birth record
|
||||
|
||||
first = ReportUtils.common_name(person,self.usenick)
|
||||
first = ReportUtils.common_name(person,self.usecall)
|
||||
text = ReportUtils.born_str(self.database,person,first,
|
||||
self.EMPTY_DATE,self.EMPTY_PLACE)
|
||||
if text:
|
||||
@ -287,7 +287,7 @@ class DetDescendantReport(Report):
|
||||
if text:
|
||||
self.doc.write_text(text)
|
||||
|
||||
first = ReportUtils.common_name(person,self.usenick)
|
||||
first = ReportUtils.common_name(person,self.usecall)
|
||||
|
||||
self.write_parents(person, first)
|
||||
self.write_marriage(person)
|
||||
@ -533,7 +533,7 @@ class DetDescendantReport(Report):
|
||||
ind = self.database.get_person_from_handle(ind_handle)
|
||||
person_name = _nd.display(ind)
|
||||
person_mark = ReportUtils.get_person_mark(self.database,ind)
|
||||
firstName = ReportUtils.common_name(ind,self.usenick)
|
||||
firstName = ReportUtils.common_name(ind,self.usecall)
|
||||
|
||||
for event_ref in ind.get_event_ref_list():
|
||||
event = self.database.get_event_from_handle(event_ref.ref)
|
||||
@ -695,7 +695,7 @@ class DetDescendantOptions(ReportOptions):
|
||||
'fulldates' : 1,
|
||||
'listc' : 1,
|
||||
'incnotes' : 1,
|
||||
'usenick' : 1,
|
||||
'usecall' : 1,
|
||||
'repplace' : 0,
|
||||
'repdate' : 0,
|
||||
'computeage' : 1,
|
||||
@ -717,8 +717,8 @@ class DetDescendantOptions(ReportOptions):
|
||||
'incnotes' : ("=0/1","Whether to include notes.",
|
||||
["Do not include notes","Include notes"],
|
||||
True),
|
||||
'usenick' : ("=0/1","Whether to use the nick name as the first name.",
|
||||
["Do not use nick name","Use nick name"],
|
||||
'usecall' : ("=0/1","Whether to use the call name as the first name.",
|
||||
["Do not use call name","Use call name"],
|
||||
True),
|
||||
'repplace' : ("=0/1","Whether to replace missing Places with blanks.",
|
||||
["Do not replace missing Places","Replace missing Places"],
|
||||
@ -880,9 +880,9 @@ class DetDescendantOptions(ReportOptions):
|
||||
self.include_notes_option = gtk.CheckButton(_("Include notes"))
|
||||
self.include_notes_option.set_active(self.options_dict['incnotes'])
|
||||
|
||||
# Print nickname
|
||||
self.usenick = gtk.CheckButton(_("Use nickname for common name"))
|
||||
self.usenick.set_active(self.options_dict['usenick'])
|
||||
# Print callname
|
||||
self.usecall = gtk.CheckButton(_("Use callname for common name"))
|
||||
self.usecall.set_active(self.options_dict['usecall'])
|
||||
|
||||
# Replace missing Place with ___________
|
||||
self.place_option = gtk.CheckButton(_("Replace missing places with ______"))
|
||||
@ -928,13 +928,14 @@ class DetDescendantOptions(ReportOptions):
|
||||
# if you want to put everyting in the generic "Options" category, use
|
||||
# self.add_option(text,widget) instead of self.add_frame_option(category,text,widget)
|
||||
|
||||
dialog.add_frame_option(_('Content'),'',self.usecall)
|
||||
dialog.add_frame_option(_('Content'),'',self.full_date_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.list_children_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.include_notes_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.age_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.dupPersons_option)
|
||||
dialog.add_frame_option(_('Content'),'',self.childRef_option)
|
||||
dialog.add_frame_option(_('Include'),'',self.image_option)
|
||||
dialog.add_frame_option(_('Include'),'',self.include_notes_option)
|
||||
dialog.add_frame_option(_('Include'),'',self.include_names_option)
|
||||
dialog.add_frame_option(_('Include'),'',self.include_events_option)
|
||||
dialog.add_frame_option(_('Include'),'',self.include_sources_option)
|
||||
@ -949,6 +950,7 @@ class DetDescendantOptions(ReportOptions):
|
||||
|
||||
self.options_dict['fulldates'] = int(self.full_date_option.get_active())
|
||||
self.options_dict['listc'] = int(self.list_children_option.get_active())
|
||||
self.options_dict['usecall'] = int(self.usecall.get_active())
|
||||
self.options_dict['incnotes'] = int(self.include_notes_option.get_active())
|
||||
self.options_dict['repplace'] = int(self.place_option.get_active())
|
||||
self.options_dict['repdate'] = int(self.date_option.get_active())
|
||||
|
Loading…
Reference in New Issue
Block a user