svn: r17069
This commit is contained in:
Craig J. Anderson 2011-04-07 01:48:59 +00:00
parent 2838468f95
commit 796e1419bc
2 changed files with 32 additions and 22 deletions

View File

@ -872,7 +872,9 @@ class AncestorTreeOptions(MenuReportOptions):
self.fillout = EnumeratedListOption(_("Display unknown\ngenerations"), self.fillout = EnumeratedListOption(_("Display unknown\ngenerations"),
0) 0)
menu.add_option(category_name, "fillout", self.fillout) self.fillout.set_help(_("The number of generations of empty"
"boxes that will be displayed"))
menu.add_option(category_name, "fill_out", self.fillout)
self.max_gen.connect('value-changed', self.__fillout_vals) self.max_gen.connect('value-changed', self.__fillout_vals)
self.__fillout_vals() self.__fillout_vals()
@ -903,8 +905,10 @@ class AncestorTreeOptions(MenuReportOptions):
category_name = _("Display") category_name = _("Display")
disp = TextOption(_("Father\nDisplay Format"), disp = TextOption(_("Father\nDisplay Format"),
["$n","%s $b" % _BORN,"%s $d" %_DIED] ) ["$n",
disp.set_help(_("Display format for the output box.")) "%s $b" %_BORN,
"{%s $d}" %_DIED] )
disp.set_help(_("Display format for the fathers box."))
menu.add_option(category_name, "father_disp", disp) menu.add_option(category_name, "father_disp", disp)
#Will add when libsubstkeyword supports it. #Will add when libsubstkeyword supports it.
@ -918,11 +922,12 @@ class AncestorTreeOptions(MenuReportOptions):
#category_name = _("Secondary") #category_name = _("Secondary")
dispMom = TextOption(_("Mother\nDisplay Format"), dispMom = TextOption(_("Mother\nDisplay Format"),
["$n","%s $b" % _BORN, ["$n",
"%s $b" %_BORN,
"%s $m" %_MARR, "%s $m" %_MARR,
"%s $d" %_DIED] "{%s $d}" %_DIED]
) )
dispMom.set_help(_("Display format for the output box.")) dispMom.set_help(_("Display format for the mothers box."))
menu.add_option(category_name, "mother_disp", dispMom) menu.add_option(category_name, "mother_disp", dispMom)
incmarr = BooleanOption(_('Include Marriage box'), False) incmarr = BooleanOption(_('Include Marriage box'), False)
@ -931,7 +936,7 @@ class AncestorTreeOptions(MenuReportOptions):
menu.add_option(category_name, "inc_marr", incmarr) menu.add_option(category_name, "inc_marr", incmarr)
marrdisp = StringOption(_("Marriage\nDisplay Format"), "%s $m" % _MARR) marrdisp = StringOption(_("Marriage\nDisplay Format"), "%s $m" % _MARR)
marrdisp.set_help(_("Display format for the output box.")) marrdisp.set_help(_("Display format for the marital box."))
menu.add_option(category_name, "marr_disp", marrdisp) menu.add_option(category_name, "marr_disp", marrdisp)
################## ##################
@ -980,6 +985,7 @@ class AncestorTreeOptions(MenuReportOptions):
self.title = EnumeratedListOption(_("Report Title"), 0) self.title = EnumeratedListOption(_("Report Title"), 0)
self.title.add_item( 0, _("Do not include a title")) self.title.add_item( 0, _("Do not include a title"))
self.title.add_item( 1, _("Include Report Title")) self.title.add_item( 1, _("Include Report Title"))
self.title.set_help(_("Choose a title for the report"))
menu.add_option(category_name, "report_title", self.title) menu.add_option(category_name, "report_title", self.title)
border = BooleanOption(_('Include a border'), False) border = BooleanOption(_('Include a border'), False)
@ -1004,7 +1010,7 @@ class AncestorTreeOptions(MenuReportOptions):
menu.add_option(category_name, "inc_note", self.usenote) menu.add_option(category_name, "inc_note", self.usenote)
self.notedisp = TextOption(_("Note"), []) self.notedisp = TextOption(_("Note"), [])
self.notedisp.set_help(_("Add a personal note\n\n" self.notedisp.set_help(_("Add a note\n\n"
"$T inserts today's date")) "$T inserts today's date"))
menu.add_option(category_name, "note_disp", self.notedisp) menu.add_option(category_name, "note_disp", self.notedisp)
@ -1012,7 +1018,7 @@ class AncestorTreeOptions(MenuReportOptions):
self.notelocal = EnumeratedListOption(_("Note Location"), 0) self.notelocal = EnumeratedListOption(_("Note Location"), 0)
for num, text in locales.note_locals(): for num, text in locales.note_locals():
self.notelocal.add_item( num, text ) self.notelocal.add_item( num, text )
self.notelocal.set_help(_("Where to place a personal note.")) self.notelocal.set_help(_("Where to place the note."))
menu.add_option(category_name, "note_place", self.notelocal) menu.add_option(category_name, "note_place", self.notelocal)
def __check_blank(self): def __check_blank(self):

View File

@ -373,7 +373,7 @@ class RecurseDown:
self.__last_direct = [] self.__last_direct = []
gui = GuiConnect() gui = GuiConnect()
self.do_gparents = gui.get_val('show_gparents') self.do_parents = gui.get_val('show_parents')
self.max_generations = gui.get_val('maxgen') self.max_generations = gui.get_val('maxgen')
self.max_spouses = gui.get_val('maxspouse') self.max_spouses = gui.get_val('maxspouse')
self.inlc_marr = gui.get_val("inc_marr") self.inlc_marr = gui.get_val("inc_marr")
@ -677,7 +677,7 @@ class MakePersonTree(RecurseDown):
center1_h = center1.get_handle() #could be mom too. center1_h = center1.get_handle() #could be mom too.
family2 = family2_h = None family2 = family2_h = None
if self.do_gparents: if self.do_parents:
family2_h = center1.get_main_parents_family_handle() family2_h = center1.get_main_parents_family_handle()
family2 = self.database.get_family_from_handle(family2_h) family2 = self.database.get_family_from_handle(family2_h)
@ -753,7 +753,7 @@ class MakeFamilyTree(RecurseDown):
father1 = mother1 = family2 = family2_h = None father1 = mother1 = family2 = family2_h = None
if father1_h: if father1_h:
father1 = self.database.get_person_from_handle(father1_h) father1 = self.database.get_person_from_handle(father1_h)
if self.do_gparents: #b3 - remove grandparents? if self.do_parents: #b3 - remove grandparents?
family2_h = father1.get_main_parents_family_handle() family2_h = father1.get_main_parents_family_handle()
family2 = self.database.get_family_from_handle(family2_h) family2 = self.database.get_family_from_handle(family2_h)
if mother1_h: if mother1_h:
@ -861,7 +861,7 @@ class MakeFamilyTree(RecurseDown):
family2_h = mother1 = family2 = None family2_h = mother1 = family2 = None
if mother1_h: if mother1_h:
mother1 = self.database.get_person_from_handle(mother1_h) mother1 = self.database.get_person_from_handle(mother1_h)
if self.do_gparents: #b3 - remove grandparents? if self.do_parents: #b3 - remove grandparents?
family2_h = mother1.get_main_parents_family_handle() family2_h = mother1.get_main_parents_family_handle()
family2 = self.database.get_family_from_handle(family2_h) family2 = self.database.get_family_from_handle(family2_h)
@ -944,7 +944,7 @@ class MakeReport(object):
self.canvas = canvas self.canvas = canvas
gui = GuiConnect() gui = GuiConnect()
self.do_gparents = gui.get_val('show_gparents') self.do_parents = gui.get_val('show_parents')
self.inlc_marr = gui.get_val("inc_marr") self.inlc_marr = gui.get_val("inc_marr")
self.max_spouses = gui.get_val('maxspouse') self.max_spouses = gui.get_val('maxspouse')
gui = None gui = None
@ -1206,12 +1206,12 @@ class GuiConnect():
if Title_type == 1: #Descendant Chart if Title_type == 1: #Descendant Chart
if self._which_report == _RPT_NAME: if self._which_report == _RPT_NAME:
if self.get_val('show_gparents'): if self.get_val('show_parents'):
return TitleDPY(database, doc) return TitleDPY(database, doc)
else: else:
return TitleDPN(database, doc) return TitleDPN(database, doc)
else: else:
if self.get_val('show_gparents'): if self.get_val('show_parents'):
return TitleDFY(database, doc) return TitleDFY(database, doc)
else: else:
return TitleDFN(database, doc) return TitleDFN(database, doc)
@ -1475,7 +1475,7 @@ class DescendTreeOptions(MenuReportOptions):
_("Will show the parents, brother and sisters of the " _("Will show the parents, brother and sisters of the "
"selected person.") "selected person.")
) )
menu.add_option(category_name, "show_gparents", self.showparents) menu.add_option(category_name, "show_parents", self.showparents)
max_gen = NumberOption(_("Generations"), 10, 1, 50) max_gen = NumberOption(_("Generations"), 10, 1, 50)
max_gen.set_help(_("The number of generations to include in the tree")) max_gen.set_help(_("The number of generations to include in the tree"))
@ -1495,7 +1495,9 @@ class DescendTreeOptions(MenuReportOptions):
category_name = _("Display") category_name = _("Display")
disp = TextOption(_("Descendant\nDisplay Format"), disp = TextOption(_("Descendant\nDisplay Format"),
["$n","%s $b" % _BORN,"%s $d" %_DIED]) ["$n",
"%s $b" %_BORN,
"{%s $d}" %_DIED])
disp.set_help(_("Display format for a descendant.")) disp.set_help(_("Display format for a descendant."))
menu.add_option(category_name, "descend_disp", disp) menu.add_option(category_name, "descend_disp", disp)
@ -1518,7 +1520,9 @@ class DescendTreeOptions(MenuReportOptions):
menu.add_option(category_name, "ind_spouse", indspouce) menu.add_option(category_name, "ind_spouse", indspouce)
sdisp = TextOption(_("Spousal\nDisplay Format"), sdisp = TextOption(_("Spousal\nDisplay Format"),
["$n","%s $b" % _BORN,"%s $d" %_DIED]) ["$n",
"%s $b" %_BORN,
"{%s $d}" %_DIED])
sdisp.set_help(_("Display format for a spouse.")) sdisp.set_help(_("Display format for a spouse."))
menu.add_option(category_name, "spouse_disp", sdisp) menu.add_option(category_name, "spouse_disp", sdisp)
@ -1528,7 +1532,7 @@ class DescendTreeOptions(MenuReportOptions):
menu.add_option(category_name, "inc_marr", incmarr) menu.add_option(category_name, "inc_marr", incmarr)
marrdisp = StringOption(_("Marriage\nDisplay Format"), "%s $m" % _MARR) marrdisp = StringOption(_("Marriage\nDisplay Format"), "%s $m" % _MARR)
marrdisp.set_help(_("Display format for the output box.")) marrdisp.set_help(_("Display format for the marital box."))
menu.add_option(category_name, "marr_disp", marrdisp) menu.add_option(category_name, "marr_disp", marrdisp)
################## ##################
@ -1611,7 +1615,7 @@ class DescendTreeOptions(MenuReportOptions):
menu.add_option(category_name, "inc_note", self.usenote) menu.add_option(category_name, "inc_note", self.usenote)
self.notedisp = TextOption(_("Note"),[]) self.notedisp = TextOption(_("Note"),[])
self.notedisp.set_help(_("Add a personal note" self.notedisp.set_help(_("Add a note"
"\n\n$T inserts today's date")) "\n\n$T inserts today's date"))
menu.add_option(category_name, "note_disp", self.notedisp) menu.add_option(category_name, "note_disp", self.notedisp)
@ -1619,7 +1623,7 @@ class DescendTreeOptions(MenuReportOptions):
notelocal = EnumeratedListOption(_("Note Location"), 2) notelocal = EnumeratedListOption(_("Note Location"), 2)
for num, text in locals.note_locals(): for num, text in locals.note_locals():
notelocal.add_item( num, text ) notelocal.add_item( num, text )
notelocal.set_help(_("Where to place a personal note.")) notelocal.set_help(_("Where to place the note."))
menu.add_option(category_name, "note_place", notelocal) menu.add_option(category_name, "note_place", notelocal)
def __check_blank(self): def __check_blank(self):