From a0796073fc5dcca4da4ebd5521095f6fe48cdd4d Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 3 Mar 2002 16:10:51 +0000 Subject: [PATCH] Better handling of FTM gedcom svn: r811 --- gramps/src/EditPerson.glade | 17 +++++++++++++++-- gramps/src/EditPerson.py | 6 +++--- gramps/src/plugins/ReadGedcom.py | 30 ++++++++++++------------------ 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/gramps/src/EditPerson.glade b/gramps/src/EditPerson.glade index 27b912358..856cadaa7 100644 --- a/gramps/src/EditPerson.glade +++ b/gramps/src/EditPerson.glade @@ -2449,8 +2449,8 @@ on_event_button_press Sun, 04 Nov 2001 15:29:48 GMT - 4 - 125,150,200,50 + 5 + 115,110,150,100,50 GTK_SELECTION_SINGLE True GTK_SHADOW_IN @@ -2468,6 +2468,19 @@ 0 + + GtkLabel + CList:title + label108 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + GtkLabel CList:title diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py index 68569ac0e..18294b8cd 100644 --- a/gramps/src/EditPerson.py +++ b/gramps/src/EditPerson.py @@ -197,7 +197,7 @@ class EditPerson: self.name_note = self.get_widget("name_note") self.name_source = self.get_widget("name_source") self.gid = self.get_widget("gid") - + self.elist = person.getEventList()[:] self.nlist = person.getAlternateNames()[:] self.alist = person.getAttributeList()[:] @@ -227,7 +227,7 @@ class EditPerson: self.gid.set_text(person.getId()) self.gid.set_editable(GrampsCfg.id_edit) - self.event_list.set_column_visibility(3,GrampsCfg.show_detail) + self.event_list.set_column_visibility(4,GrampsCfg.show_detail) self.name_list.set_column_visibility(2,GrampsCfg.show_detail) self.attr_list.set_column_visibility(2,GrampsCfg.show_detail) self.addr_list.set_column_visibility(2,GrampsCfg.show_detail) @@ -1387,7 +1387,7 @@ def disp_addr(addr): #------------------------------------------------------------------------- def disp_event(event): attr = Utils.get_detail_flags(event) - return [const.display_pevent(event.getName()), + return [const.display_pevent(event.getName()),event.getDescription(), event.getQuoteDate(),event.getPlaceName(),attr] def src_changed(parent): diff --git a/gramps/src/plugins/ReadGedcom.py b/gramps/src/plugins/ReadGedcom.py index 4886e935d..2f9d16641 100644 --- a/gramps/src/plugins/ReadGedcom.py +++ b/gramps/src/plugins/ReadGedcom.py @@ -725,17 +725,17 @@ class GedcomParser: self.parse_person_attr(attr,2) continue else: - val = self.gedsource.tag2gramps(matches[1]) + val = self.gedsource.tag2gramps(n) if val: event.setName(val) else: - event.setName(matches[1]) + event.setName(n) self.parse_person_event(event,2) - if matches[2] != None: + if matches[2]: event.setDescription(matches[2]) self.person.addEvent(event) - + def parse_optional_note(self,level): note = "" while 1: @@ -1119,20 +1119,15 @@ class GedcomParser: self.person.addAltFamily(family,mrel,frel) elif matches[1] == "PLAC": val = matches[2] - n = string.strip(event.getName()) - if self.is_ftw and n in ["Occupation","Degree","SSN"]: - event.setDescription(val) - self.ignore_sub_junk(level+1) + if self.placemap.has_key(val): + place = self.placemap[val] else: - if self.placemap.has_key(val): - place = self.placemap[val] - else: - place = Place() - place.set_title(matches[2]) - self.db.addPlace(place) - self.placemap[val] = place - event.setPlace(place) - self.ignore_sub_junk(level+1) + place = Place() + place.set_title(matches[2]) + self.db.addPlace(place) + self.placemap[val] = place + event.setPlace(place) + self.ignore_sub_junk(level+1) elif matches[1] == "TYPE": # eventually do something intelligent here pass @@ -1645,7 +1640,6 @@ class GedcomParser: index = 0 new_pmax = self.db.pmapIndex for person in self.added.keys(): - print index,person.getPrimaryName().getName() index = index + 1 if self.refn.has_key(person): val = self.refn[person]