Better handling of FTM gedcom

svn: r811
This commit is contained in:
Don Allingham 2002-03-03 16:10:51 +00:00
parent 5b0f8628da
commit a0796073fc
3 changed files with 30 additions and 23 deletions

View File

@ -2449,8 +2449,8 @@
<handler>on_event_button_press</handler>
<last_modification_time>Sun, 04 Nov 2001 15:29:48 GMT</last_modification_time>
</signal>
<columns>4</columns>
<column_widths>125,150,200,50</column_widths>
<columns>5</columns>
<column_widths>115,110,150,100,50</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
@ -2468,6 +2468,19 @@
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label108</name>
<label>Description</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>

View File

@ -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):

View File

@ -725,14 +725,14 @@ 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)
@ -1119,11 +1119,6 @@ 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)
else:
if self.placemap.has_key(val):
place = self.placemap[val]
else:
@ -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]