diff --git a/NEWS b/NEWS index ce0eaf8bd..93bdf097d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +Version 0.1.5 + +* Plenty of bug fixes in the report generators and merging due to the + previous addition of date ranges. +* Added PDF file type generation for reports. Depends on the reportlab + package (available at www.reportlab.com). If the package is not + installed, gramps will run, but without PDF generation ability. +* Will use the Python Imaging Library if present to handle images. If + not, it will revert to the old method of using Imagick (convert). +* The user can select an attribute (from the attribute list) to display + on the Edit Person window. +* The internal gramps ID is now displayed on the Edit Person window. +* Marriage types can now be recorded. +* Addresses now use a single date instead of multiple dates, since + dates can now deal with ranges. +* Due to a bug in Python 2.0/GTK interaction, list colors are disabled + for Python 2.0 and above. +* configure script now properly deals with Python include paths, + eliminating the need to hand edit the src/Makefile to get gramps to + run under Python 2.X. +* Photos are now displayed properly again in the Edit Person gallery. +* Family notes are now implemented. + Version 0.1.4 * Implemented date ranges. Valid forms are "from to " and diff --git a/src/Date.py b/src/Date.py index 10ee944dd..3088a7008 100644 --- a/src/Date.py +++ b/src/Date.py @@ -1,4 +1,4 @@ -# + # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000 Donald N. Allingham @@ -240,7 +240,9 @@ class SingleDate: re.IGNORECASE) quick= re.compile(start + "(\d+)?\s(\S\S\S)?\s(\d+)?", re.IGNORECASE) - fmt3 = re.compile(start + "(\d+)\s*[./-]\s*(\d+)\s*[./-]\s*(\d+)\s*$", + fmt3 = re.compile(start + r"([?\d]+)\s*[./-]\s*([?\d]+)\s*[./-]\s*([?\d]+)\s*$", + re.IGNORECASE) + fmt7 = re.compile(start + r"([?\d]+)\s*[./-]\s*([?\d]+)\s*$", re.IGNORECASE) fmt4 = re.compile(start + "(\S+)\s+(\d+)\s*$", re.IGNORECASE) @@ -540,7 +542,7 @@ class SingleDate: else: retval = "%d/??/%d" % (self.month+1,self.year) elif self.month == -1: - retval = "%d" % self.year + retval = "??-%d-%d" % (self.day,self.year) else: if self.year == -1: retval = "%d/%d/????" % (self.month+1,self.day) @@ -575,7 +577,7 @@ class SingleDate: else: retval = "%d-??-%d" % (self.month+1,self.year) elif self.month == -1: - retval = "%d" % self.year + retval = "??-%d-%d" % (self.day,self.year) else: if self.year == -1: retval = "%d-%d-????" % (self.month+1,self.day) @@ -610,7 +612,7 @@ class SingleDate: else: retval = "??/%d/%d" % (self.month+1,self.year) elif self.month == -1: - retval = "%d" % self.year + retval = "%d/??/%d" % (self.day,self.year) else: if self.year == -1: retval = "%d/%d/????" % (self.day,self.month+1) @@ -644,7 +646,7 @@ class SingleDate: else: retval = "??-%d-%d" % (self.month+1,self.year) elif self.month == -1: - retval = "%d" % self.year + retval = "%d-??-%d" % (self.day,self.year) elif self.year == -1: retval = "%d-%d-????" % (self.day,self.month+1) else: @@ -722,16 +724,42 @@ class SingleDate: self.setYear(string.atoi(matches[1])) return 1 + match = SingleDate.fmt7.match(text) + if match != None: + matches = match.groups() + self.getMode(matches[0]) + try: + self.setMonth(string.atoi(matches[1])) + except: + self.setMonth(-1) + try: + self.setYear(string.atoi(matches[2])) + except: + self.setYear(-1) + return 1 + match = SingleDate.fmt3.match(text) if match != None: matches = match.groups() self.getMode(matches[0]) if Date.entryCode == 0: - self.setMonth(string.atoi(matches[1])) - self.setDay(string.atoi(matches[2])) + try: + self.setMonth(string.atoi(matches[1])) + except: + self.setMonth(-1) + try: + self.setDay(string.atoi(matches[2])) + except: + self.setDay(-1) else: - self.setMonth(string.atoi(matches[2])) - self.setDay(string.atoi(matches[1])) + try: + self.setMonth(string.atoi(matches[2])) + except: + self.setMonth(-1) + try: + self.setDay(string.atoi(matches[1])) + except: + self.setDay(-1) val = matches[3] if val == None or val[0] == '?': self.setYear(-1) @@ -839,6 +867,8 @@ if __name__ == "__main__": checkit("11 JAN 1923") checkit("11-1-1929") checkit("4/3/1203") + checkit("3/1203") + checkit("?/3/1203") checkit("January 4, 1923") checkit("before 3/3/1239") checkit("est 2-3-1023") diff --git a/src/OpenOfficeDoc.py b/src/OpenOfficeDoc.py index 682ce4d91..ef352ac98 100644 --- a/src/OpenOfficeDoc.py +++ b/src/OpenOfficeDoc.py @@ -51,7 +51,6 @@ class OpenOfficeDoc(TextDoc): def open(self,filename): import time - print filename t = time.localtime(time.time()) self.time = "%04d-%02d-%02dT%02d:%02d:%02d" % \ (t[0],t[1],t[2],t[3],t[4],t[5]) diff --git a/src/PdfDoc.py b/src/PdfDoc.py index def4d9a27..d0660dfc3 100644 --- a/src/PdfDoc.py +++ b/src/PdfDoc.py @@ -122,7 +122,6 @@ class PdfDoc(TextDoc): def end_paragraph(self): if self.in_table == 0 and self.image == 0: - print self.text self.story.append(Paragraph(self.text,self.current_para)) self.story.append(Spacer(1,0.25*cm)) else: diff --git a/src/PdfDrawDoc.py b/src/PdfDrawDoc.py index 6143191d2..8147d54f4 100644 --- a/src/PdfDrawDoc.py +++ b/src/PdfDrawDoc.py @@ -104,8 +104,6 @@ class PdfDrawDoc(DrawDoc): start_y = (y + h/2.0 + l/2.0 + l) - ((l*size) + ((l-1)*0.2))/2.0 start_x = (x + w/2.0) - print y,y+h,start_y - self.f.saveState() self.f.setFillColor(make_color(font.get_color())) if font.get_type_face() == FONT_SANS_SERIF: diff --git a/src/const.py b/src/const.py index 6c966fd5f..368c76997 100644 --- a/src/const.py +++ b/src/const.py @@ -67,7 +67,7 @@ gtkrcFile = rootDir + os.sep + "gtkrc" # #------------------------------------------------------------------------- progName = "gramps" -version = "0.1.5pre" +version = "0.1.5" copyright = "(C) 2001 Donald N. Allingham" authors = ["Donald N. Allingham"] comments = _("Gramps (Genealogical Research and Analysis Management ") +\ diff --git a/src/gramps_main.py b/src/gramps_main.py index 0f06f0a4d..029acb672 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -449,9 +449,6 @@ def on_choose_parents_clicked(obj): global select_father global family_window -# select_father = active_father -# select_mother = active_mother - if active_parents: select_father = active_parents.getFather() select_mother = active_parents.getMother() @@ -725,8 +722,12 @@ def find_family(father,mother): family = database.newFamily() family.setFather(father) family.setMother(mother) - father.addFamily(family) - mother.addFamily(family) + + if father: + father.addFamily(family) + + if mother: + mother.addFamily(family) return family @@ -865,7 +866,8 @@ def on_select_spouse_clicked(obj): # #------------------------------------------------------------------------- def on_edit_active_person(obj): - load_person(active_person) + if active_person: + load_person(active_person) #------------------------------------------------------------------------- # @@ -873,7 +875,8 @@ def on_edit_active_person(obj): # #------------------------------------------------------------------------- def on_edit_spouse_clicked(obj): - load_person(active_spouse) + if active_spouse: + load_person(active_spouse) #------------------------------------------------------------------------- # @@ -881,7 +884,8 @@ def on_edit_spouse_clicked(obj): # #------------------------------------------------------------------------- def on_edit_mother_clicked(obj): - load_person(active_mother) + if active_mother: + load_person(active_mother) #------------------------------------------------------------------------- # @@ -889,7 +893,8 @@ def on_edit_mother_clicked(obj): # #------------------------------------------------------------------------- def on_edit_father_clicked(obj): - load_person(active_father) + if active_father: + load_person(active_father) #------------------------------------------------------------------------- # @@ -1483,8 +1488,6 @@ def load_person(person): #------------------------------------------------------------------------- def load_family(): global active_mother - global active_father - global active_family global active_parents global active_spouse @@ -1612,11 +1615,15 @@ def change_parents(family): fv_mother.set_text("") mother_next.set_sensitive(0) father_next.set_sensitive(0) + active_father = None + active_mother = None else : fv_father.set_text("") fv_mother.set_text("") mother_next.set_sensitive(0) father_next.set_sensitive(0) + active_father = None + active_mother = None #------------------------------------------------------------------------- # diff --git a/src/plugins/AncestorGraph.py b/src/plugins/AncestorGraph.py index f00a01d9c..e583f0851 100644 --- a/src/plugins/AncestorGraph.py +++ b/src/plugins/AncestorGraph.py @@ -188,6 +188,7 @@ def on_ok_clicked(obj): txtcolor, bdrcolor, font) + displayWindow.show() utils.destroy_passed_object(obj) diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py index f4e4026a5..dea5eee1f 100644 --- a/src/plugins/DescendReport.py +++ b/src/plugins/DescendReport.py @@ -107,7 +107,6 @@ class DescendantReport: self.doc.start_paragraph("Title") name = self.person.getPrimaryName().getRegularName() self.doc.write_text(_("Descendants of %s") % name) - self.doc.write_text() self.doc.end_paragraph() self.dump(1,self.person)