diff --git a/gramps/NEWS b/gramps/NEWS index 4cd9a064a..01fdaa7b0 100644 --- a/gramps/NEWS +++ b/gramps/NEWS @@ -10,6 +10,8 @@ Version 0.5.0 the filter. * New verification tool added to look for odd things in the database. +* Improvements in GEDCOM import, including handling some + Family Tree Maker pecularities. Version 0.4.1 * Tool/Report menus added to top level menu bar diff --git a/gramps/gramps.spec b/gramps/gramps.spec index 5d1c4023a..85f2bd1cb 100644 --- a/gramps/gramps.spec +++ b/gramps/gramps.spec @@ -1,4 +1,4 @@ -%define ver 0.4.1 +%define ver 0.5.0 %define rel 1 %define prefix /usr diff --git a/gramps/src/EditPerson.glade b/gramps/src/EditPerson.glade index 5a9bd017e..b3e8fdd60 100644 --- a/gramps/src/EditPerson.glade +++ b/gramps/src/EditPerson.glade @@ -2386,7 +2386,7 @@ GtkLabel CList:title - attr_details + attrib_details GTK_JUSTIFY_CENTER False diff --git a/gramps/src/const.py b/gramps/src/const.py index b928204ab..dbec31c22 100644 --- a/gramps/src/const.py +++ b/gramps/src/const.py @@ -75,7 +75,7 @@ gtkrcFile = rootDir + os.sep + "gtkrc" # #------------------------------------------------------------------------- progName = "gramps" -version = "0.4.2pre" +version = "0.5.0" copyright = "(C) 2001 Donald N. Allingham" authors = ["Donald N. Allingham"] comments = _("Gramps (Genealogical Research and Analysis Management Programming System) is a personal genealogy program that can be extended by using the Python programming language.") diff --git a/gramps/src/gramps.glade b/gramps/src/gramps.glade index 38873111e..3a2023b42 100644 --- a/gramps/src/gramps.glade +++ b/gramps/src/gramps.glade @@ -5666,6 +5666,7 @@ Unknown entry1 250 True + True True True 0 diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py index 95c731895..f0b5e862b 100755 --- a/gramps/src/gramps_main.py +++ b/gramps/src/gramps_main.py @@ -2903,7 +2903,7 @@ def export_callback(obj,plugin_function): # #------------------------------------------------------------------------- def import_callback(obj,plugin_function): - plugin_function(database,active_person,update_display) + plugin_function(database,active_person,tool_callback) topWindow.set_title("Gramps - " + database.getSavePath()) #------------------------------------------------------------------------- diff --git a/gramps/src/locale/de/LC_MESSAGES/gramps.mo b/gramps/src/locale/de/LC_MESSAGES/gramps.mo index dfed195aa..efbd6567c 100644 Binary files a/gramps/src/locale/de/LC_MESSAGES/gramps.mo and b/gramps/src/locale/de/LC_MESSAGES/gramps.mo differ diff --git a/gramps/src/locale/fr/LC_MESSAGES/gramps.mo b/gramps/src/locale/fr/LC_MESSAGES/gramps.mo index b545b1976..591cbe565 100644 Binary files a/gramps/src/locale/fr/LC_MESSAGES/gramps.mo and b/gramps/src/locale/fr/LC_MESSAGES/gramps.mo differ diff --git a/gramps/src/plugins/ReadGedcom.py b/gramps/src/plugins/ReadGedcom.py index 841e07b1b..86b7c7ce9 100644 --- a/gramps/src/plugins/ReadGedcom.py +++ b/gramps/src/plugins/ReadGedcom.py @@ -46,6 +46,7 @@ db = None callback = None glade_file = None clear_data = 0 +is_ftw = 0 photo_types = [ "jpeg", "bmp", "pict", "pntg", "tpic", "png", "gif", "tiff", "pcx" ] @@ -647,8 +648,14 @@ class GedcomParser: self.parse_person_event(event,2) elif matches[1] == "EVEN": event = Event() - self.person.addEvent(event) self.parse_person_event(event,2) + if string.strip(event.getName()) == "SSN": + attr = Attribute() + attr.setType("Social Security Number") + attr.setValue(event.getDescription()) + self.person.addAttribute(attr) + else: + self.person.addEvent(event) else: event = Event() try: @@ -930,17 +937,22 @@ class GedcomParser: self.ignore_sub_junk(level+1) elif matches[1] == "PLAC": val = matches[2] - place = None - for p in self.db.getPlaceMap().values(): - if val == p.get_title(): - place = p - break + n = string.strip(event.getName()) + if is_ftw and n in ["Occupation","Degree","SSN"]: + event.setDescription(val) + self.ignore_sub_junk(level+1) else: - place = Place() - place.set_title(matches[2]) - self.db.addPlace(place) - event.setPlace(place) - self.ignore_sub_junk(level+1) + place = None + for p in self.db.getPlaceMap().values(): + if val == p.get_title(): + place = p + break + else: + place = Place() + place.set_title(matches[2]) + self.db.addPlace(place) + event.setPlace(place) + self.ignore_sub_junk(level+1) elif matches[1] == "CAUS": info = matches[2] + self.parse_continue_data(level+1) if note == "": @@ -1168,6 +1180,8 @@ class GedcomParser: # #--------------------------------------------------------------------- def parse_header_source(self): + global is_ftw + while 1: matches = self.get_next() @@ -1177,6 +1191,8 @@ class GedcomParser: elif matches[1] == "SOUR": if self.created_obj.get_text() == "": self.update(self.created_obj,matches[2]) + if matches[2] == "FTW": + is_ftw = 1 elif matches[1] == "NAME": self.update(self.created_obj,matches[2]) elif matches[1] == "VERS":