* src/GrampsDb/_ReadGedcom.py: fix MARNM

svn: r5795
This commit is contained in:
Don Allingham 2006-01-19 04:25:36 +00:00
parent 5b0cd6fe27
commit 2c2bcaf04f
4 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,5 @@
2006-01-18 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: fix MARNM
* src/GrampsWidgets.py: edit label for column header
* src/DisplayTabs.py: mediatab improvements
* src/EditFamily.py: monitor for changed people and update if needed,

View File

@ -1041,7 +1041,7 @@ class GedcomParser:
filename = matches[2]
elif matches[1] == TOKEN_NOTE:
note = matches[2] + self.parse_continue_data(level+1)
elif matches[1][0] == TOKEN_UNKNOWN:
elif matches[1] == TOKEN_UNKNOWN:
self.ignore_sub_junk(level+1)
else:
self.barf(level+1)
@ -1577,13 +1577,13 @@ class GedcomParser:
if len(data) == 1:
name = RelLib.Name(person.get_primary_name())
name.set_surname(data[0])
name.set_type('Married Name')
name.set_type((RelLib.Name.MARRIED,''))
person.add_alternate_name(name)
elif len(data) > 1:
name = RelLib.Name()
name.set_surname(data[-1])
name.set_first_name(' '.join(data[0:-1]))
name.set_type('Married Name')
name.set_type((RelLib.Name.MARRIED,''))
person.add_alternate_name(name)
def parse_header_head(self):

View File

@ -97,10 +97,14 @@ class LinkBox(gtk.HBox):
class EditLabel(gtk.HBox):
def __init__(self,text):
gtk.HBox.__init__(self)
self.pack_start(BasicLabel(text),False)
label = BasicLabel(text)
self.pack_start(label,False)
self.pack_start(gtk.image_new_from_stock(gtk.STOCK_EDIT,
gtk.ICON_SIZE_MENU),False)
self.set_spacing(4)
# self.tooltip = gtk.Tooltips()
# self.tooltip.set_tip(label,_('Click in the cell to change the value'))
# self.tooltip.enable()
self.show_all()
class BasicLabel(gtk.Label):

View File

@ -202,7 +202,7 @@ class Name(PrivateSourceNote,DateBase):
def set_type(self,the_type):
"""sets the type of the Name instance"""
if not type(the_type) == tuple:
if the_type in [UNKNOWN,CUSTOM,AKA,BIRTH,MARRIED]:
if the_type in [self.UNKNOWN,self.CUSTOM,self.AKA,self.BIRTH,self.MARRIED]:
warn( "set_type now takes a tuple", DeprecationWarning, 2)
# Wrapper for old API
# remove when transitition done.