From 2c2bcaf04f418060a97851ec747a6a5311f03454 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 19 Jan 2006 04:25:36 +0000 Subject: [PATCH] * src/GrampsDb/_ReadGedcom.py: fix MARNM svn: r5795 --- gramps2/ChangeLog | 1 + gramps2/src/GrampsDb/_ReadGedcom.py | 6 +++--- gramps2/src/GrampsWidgets.py | 6 +++++- gramps2/src/RelLib/_Name.py | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 923b8c127..7c55bf51e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,5 @@ 2006-01-18 Don Allingham + * 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, diff --git a/gramps2/src/GrampsDb/_ReadGedcom.py b/gramps2/src/GrampsDb/_ReadGedcom.py index dde54f0c4..1404ccd2c 100644 --- a/gramps2/src/GrampsDb/_ReadGedcom.py +++ b/gramps2/src/GrampsDb/_ReadGedcom.py @@ -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): diff --git a/gramps2/src/GrampsWidgets.py b/gramps2/src/GrampsWidgets.py index c53f43211..f03bc08a7 100644 --- a/gramps2/src/GrampsWidgets.py +++ b/gramps2/src/GrampsWidgets.py @@ -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): diff --git a/gramps2/src/RelLib/_Name.py b/gramps2/src/RelLib/_Name.py index 1c8e2ddd5..08a8dff74 100644 --- a/gramps2/src/RelLib/_Name.py +++ b/gramps2/src/RelLib/_Name.py @@ -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.