diff --git a/gramps/src/plugins/DetDescendantReport.py b/gramps/src/plugins/DetDescendantReport.py index 1d5a963fe..111c844b1 100644 --- a/gramps/src/plugins/DetDescendantReport.py +++ b/gramps/src/plugins/DetDescendantReport.py @@ -99,6 +99,9 @@ class DetDescendantReport(Report): NAME Born: DATE PLACE Died: DATE e NAME Born: DATE PLACE Died: PLACE d NAME Born: DATE PLACE c + NAME Born: DATE Died: DATE PLACE b + NAME Born: DATE Died: DATE a + NAME Born: DATE Died: PLACE 9 NAME Born: DATE 8 NAME Born: PLACE Died: DATE PLACE 7 NAME Born: PLACE Died: DATE 6 @@ -138,7 +141,7 @@ class DetDescendantReport(Report): #print "Child List: <", birth.getDate(), ">", birth.getPlaceName() if birth.getDate() != "": #print birth.getPlaceName() - if birth.getPlaceName() != None: + if birth.getPlaceName() != "": if death.getDate() != "": if death.getPlaceName() != "": self.doc.write_text(_("- %s Born: %s %s Died: %s %s") % \ @@ -163,13 +166,13 @@ class DetDescendantReport(Report): else: self.doc.write_text(_("- %s Born: %s Died: %s") % \ (name, birth.getDate(), death.getDate())) # a - elif death.PlaceName() != "": + elif death.getPlaceName() != "": self.doc.write_text(_("- %s Born: %s Died: %s") % \ - (name, birth.getDate(), birth.getPlaceName())) # 9 + (name, birth.getDate(), death.getPlaceName())) # 9 else: self.doc.write_text(_("- %s Born: %s") % \ (name, birth.getDate())) # 8 else: - if birth.getPlaceName() != None: + if birth.getPlaceName() != "": if death.getDate() != "": if death.getPlaceName() != "": self.doc.write_text(_("- %s Born: %s Died: %s %s") % \ @@ -442,7 +445,7 @@ class DetDescendantReport(Report): HE/SHE married SPOUSE on FULLDATE in PLACE. HE/SHE married SPOUSE on FULLDATE. HE/SHE married SPOUSE in PLACE. - He/SHE married SPOUSE + HE/SHE married SPOUSE """ famList= person.getFamilyList() if len(famList) > 0: @@ -453,11 +456,11 @@ class DetDescendantReport(Report): if person.getGender() == RelLib.Person.male: if fam.getMother() != None: spouse= fam.getMother().getPrimaryName().getRegularName() - if fam_num == 1: - heshe= _("He") - elif fam_num < len(famList): - heshe= _(",") - else: heshe= _("and he") + if fam_num == 1: + heshe= _("He") + elif fam_num < len(famList): + heshe= _(",") + else: heshe= _("and he") else: if fam_num == 1: heshe= _("She") @@ -489,22 +492,22 @@ class DetDescendantReport(Report): if spouse != "": if fulldate == "" and place == "": - t= _(" %s married %s" % (heshe, spouse)) + t= _(" %s married %s") % (heshe, spouse) elif fulldate == "" and place != "": - t= _(" %s married %s in %s" % (heshe, spouse, place)) + t= _(" %s married %s in %s") % (heshe, spouse, place) elif fulldate != "" and place == "": - t= _(" %s married %s on %s" % (heshe, spouse, fulldate)) - else: t= _(" %s married %s on %s in %s" % \ - (heshe, spouse, fulldate, place)) + t= _(" %s married %s on %s") % (heshe, spouse, fulldate) + else: t= _(" %s married %s on %s in %s") % \ + (heshe, spouse, fulldate, place) else: if fulldate == "" and place == "": t= _(" %s married") elif fulldate == "" and place != "": - t= _(" %s married in %s" % (heshe, place)) + t= _(" %s married in %s") % (heshe, place) elif fulldate != "" and place == "": - t= _(" %s married on %s" % (heshe, fulldate)) - else: t= _(" %s married on %s in %s" % \ - (heshe, fulldate, place)) + t= _(" %s married on %s") % (heshe, fulldate) + else: t= _(" %s married on %s in %s") % \ + (heshe, fulldate, place) if t != "": self.doc.write_text(t) if fam_num == len(famList): self.doc.write_text(".") @@ -631,7 +634,6 @@ class DetDescendantReport(Report): spouseName= fam.getFather().getPrimaryName().getFirstName() self.doc.start_paragraph("Title") - #print "title: ", name, spouseName, spouseName if spouseName != "": name = spouseName + " and " + name @@ -644,7 +646,6 @@ class DetDescendantReport(Report): generation = 0 need_header = 1 -# for generation in xrange(self.max_generations): for generation in xrange(len(self.genKeys)): if self.pgbrk and generation > 0: self.doc.page_break() @@ -656,6 +657,7 @@ class DetDescendantReport(Report): self.prevGenIDs= self.genIDs.copy() self.genIDs.clear() + for key in self.genKeys[generation]: person = self.map[key] self.genIDs[person.getId()]= key @@ -769,51 +771,6 @@ class DetDescendantReportDialog(TextReportDialog): MyReport.write_report() - def add_user_options(self): - - # Create a GTK Checkbox widget for pronoun usage - self.first_name_option = gtk.GtkCheckButton(_("Use first names instead of pronouns")) - self.first_name_option.set_active(0) - - # Create a GTK Checkbox widget for full date usage - self.full_date_option = gtk.GtkCheckButton(_("Use full dates instead of only the year")) - self.full_date_option.set_active(1) - - # Create a GTK Checkbox widget for full date usage - self.list_children_option = gtk.GtkCheckButton(_("List children")) - self.list_children_option.set_active(1) - - # Add new options. The first argument is the tab name for grouping options. - # 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) - - self.add_frame_option('Content','',self.first_name_option) - self.add_frame_option('Content','',self.full_date_option) - self.add_frame_option('Content','',self.list_children_option) - - def parse_report_options_frame(self): - """Parse the report options frame of the dialog. Save the - user selected choices for later use.""" - - # call the parent task to handle normal options - ReportDialog.parse_report_options_frame(self) - - # get values from the widgets - if self.first_name_option.get_active(): - self.firstName = reportOptions.Yes - else: - self.firstName = reportOptions.No - - if self.full_date_option.get_active(): - self.fullDate = reportOptions.Yes - else: - self.fullDate = reportOptions.No - - if self.list_children_option.get_active(): - self.listChildren = reportOptions.Yes - else: - self.listChildren = reportOptions.No - #------------------------------------------------------------------------ # # @@ -954,7 +911,7 @@ class reportOptions: #Add Photos and Images to report self.addImages= reportOptions.No - self.imageAttrTag= "DetDecendantReport" + self.imageAttrTag= "DetDescendantReport" #Omit sensitive information such as birth, christening, marriage # for living after XXXXX date.