From 13b2796ead6b71469d7e84159a3a5019d063e97e Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 1 Dec 2001 04:23:42 +0000 Subject: [PATCH] Fixed date handling for GEDCOM svn: r600 --- gramps/src/Date.py | 2 +- gramps/src/EditPerson.py | 2 +- gramps/src/GrampsParser.py | 16 +- gramps/src/Marriage.py | 69 +++++- gramps/src/RelLib.py | 11 + gramps/src/WriteXML.py | 1 + gramps/src/const.py | 347 +++++++++++++++---------------- gramps/src/gramps_main.py | 10 +- gramps/src/marriage.glade | 174 ++++++++++++++++ gramps/src/plugins/ReadGedcom.py | 18 +- 10 files changed, 454 insertions(+), 196 deletions(-) diff --git a/gramps/src/Date.py b/gramps/src/Date.py index a3d331fea..05b03ece6 100644 --- a/gramps/src/Date.py +++ b/gramps/src/Date.py @@ -839,7 +839,7 @@ class SingleDate: if self.month == UNDEF: raise Date.Error,text self.day = int(matches[1]) - if len(matches) == 4: + if len(matches) == 4 and matches[3] != None: self.setYearVal(matches[3]) else: self.year = UNDEF diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py index 9a7cea3fc..34b2c8d85 100644 --- a/gramps/src/EditPerson.py +++ b/gramps/src/EditPerson.py @@ -959,7 +959,7 @@ class EditPerson: d = Date() d.set(date) if compare_dates(d,ord.getDateObj()) != 0: - ord.setDateObj(date) + ord.setDateObj(d) utils.modified() if ord.getTemple() != temple: ord.setTemple(temple) diff --git a/gramps/src/GrampsParser.py b/gramps/src/GrampsParser.py index 4bb04d93e..1cfa8d8da 100644 --- a/gramps/src/GrampsParser.py +++ b/gramps/src/GrampsParser.py @@ -122,12 +122,16 @@ class GrampsParser: def start_lds_ord(self,attrs): type = u2l(attrs['type']) self.ord = LdsOrd() - if type == "baptism": - self.person.setLdsBaptism(self.ord) - elif type == "endowment": - self.person.setLdsEndowment(self.ord) - else: - self.person.setLdsSeal(self.ord) + if self.person: + if type == "baptism": + self.person.setLdsBaptism(self.ord) + elif type == "endowment": + self.person.setLdsEndowment(self.ord) + elif type == "sealed_to_parents": + self.person.setLdsSeal(self.ord) + elif self.family: + if type == "sealed_to_spouse": + self.family.setLdsSeal(self.ord) def start_temple(self,attrs): self.ord.setTemple(u2l(attrs['val'])) diff --git a/gramps/src/Marriage.py b/gramps/src/Marriage.py index baa63c1ad..1a556861f 100644 --- a/gramps/src/Marriage.py +++ b/gramps/src/Marriage.py @@ -40,6 +40,11 @@ import ImageSelect from intl import gettext _ = gettext + +_temple_names = const.lds_temple_codes.keys() +_temple_names.sort() +_temple_names = [""] + _temple_names + #------------------------------------------------------------------------- # # Marriage class @@ -47,19 +52,15 @@ _ = gettext #------------------------------------------------------------------------- class Marriage: - #------------------------------------------------------------------------- - # - # Initializes the class, and displays the window - # - #------------------------------------------------------------------------- def __init__(self,family,db): + """Initializes the Marriage class, and displays the window""" self.family = family self.db = db self.path = db.getSavePath() self.top = libglade.GladeXML(const.marriageFile,"marriageEditor") top_window = self.get_widget("marriageEditor") - fid = "f%s" % family.getId() + fid = family.getId() plwidget = self.top.get_widget("photolist") self.gallery = ImageSelect.Gallery(family, self.path, fid, plwidget, db) self.top.signal_autoconnect({ @@ -103,6 +104,8 @@ class Marriage: self.attr_value = self.get_widget("attr_value") self.event_details = self.get_widget("event_details") self.attr_details_field = self.get_widget("attr_details") + self.lds_date = self.get_widget("lds_date") + self.lds_temple = self.get_widget("lds_temple") self.event_list.set_column_visibility(3,Config.show_detail) self.attr_list.set_column_visibility(2,Config.show_detail) @@ -119,6 +122,18 @@ class Marriage: self.type_field.entry.set_text(frel) self.gid.set_text(family.getId()) self.gid.set_editable(Config.id_edit) + + ord = family.getLdsSeal() + self.lds_temple.set_popdown_strings(_temple_names) + if ord: + self.lds_date.set_text(ord.getDate()) + if ord.getTemple() != "": + name = const.lds_temple_to_abrev[ord.getTemple()] + else: + name = "" + self.lds_temple.entry.set_text(name) + else: + self.lds_temple.entry.set_text("") # set notes data self.notes_field.set_point(0) @@ -168,6 +183,24 @@ class Marriage: if self.family.getId() != idval: changed = 1 + date = self.lds_date.get_text() + temple = self.lds_temple.entry.get_text() + if const.lds_temple_codes.has_key(temple): + temple = const.lds_temple_codes[temple] + else: + temple = "" + ord = self.family.getLdsSeal() + if not ord: + if date or temple: + changed = 1 + else: + d = Date() + d.set(date) + if compare_dates(d,ord.getDateObj()) != 0: + changed = 1 + elif ord.getTemple() != temple: + changed = 1 + return changed def on_cancel_edit(self,obj): @@ -220,6 +253,30 @@ class Marriage: self.family.setNote(text) utils.modified() + date = self.lds_date.get_text() + temple = self.lds_temple.entry.get_text() + if const.lds_temple_codes.has_key(temple): + temple = const.lds_temple_codes[temple] + else: + temple = "" + ord = self.family.getLdsSeal() + if not ord: + if date or temple: + ord = LdsOrd() + ord.setDate(date) + ord.setTemple(temple) + self.family.setLdsSeal(ord) + utils.modified() + else: + d = Date() + d.set(date) + if compare_dates(d,ord.getDateObj()) != 0: + ord.setDateObj(d) + utils.modified() + if ord.getTemple() != temple: + ord.setTemple(temple) + utils.modified() + utils.destroy_passed_object(self.get_widget("marriageEditor")) self.update_lists() diff --git a/gramps/src/RelLib.py b/gramps/src/RelLib.py index 101134d41..e7e675873 100644 --- a/gramps/src/RelLib.py +++ b/gramps/src/RelLib.py @@ -616,6 +616,10 @@ class Address(DataObj): """returns the Date object associated with the Address""" return self.date + def setDateObj(self,obj): + """sets the Date object associated with the Address""" + self.date = obj + def setStreet(self,val): """sets the street portion of the Address""" self.street = val @@ -1246,6 +1250,13 @@ class Family: self.note = Note() self.attributeList = [] self.position = None + self.lds_seal = None + + def setLdsSeal(self,ord): + self.lds_seal = ord + + def getLdsSeal(self): + return self.lds_seal def setPosition(self,pos): """sets a graphical location pointer for graphic display (x,y)""" diff --git a/gramps/src/WriteXML.py b/gramps/src/WriteXML.py index d0ab4f106..6c29968ee 100644 --- a/gramps/src/WriteXML.py +++ b/gramps/src/WriteXML.py @@ -604,6 +604,7 @@ def write_xml_data(database, g, callback, sp): for event in family.getEventList(): dump_event(g,event,3) + dump_ordinance(g,"sealed_to_spouse",family.getLdsSeal(),3) write_photo_list(g,family.getPhotoList()) diff --git a/gramps/src/const.py b/gramps/src/const.py index 2d29049c0..60f5dc629 100644 --- a/gramps/src/const.py +++ b/gramps/src/const.py @@ -513,181 +513,180 @@ places = [] surnames = [] lds_temple_codes = { - "ALBERTA" : "ALBER", - "APIA" : "SAMOA", - "ARIZONA" : "ARIZO", - "ATLANTA GA": "ATLAN", - "BOGOTA COL.": "BOGOT", - "BOISE ID": "BOISE", - "BOUNTIFUL UT": "BOUNT", - "BUENOS AIRES": "BAIRE", - "CHICAGO IL": "CHICA", - "COCHABAMBA, BOLIVA": "COCHA", - "DALLAS, TX": "DALLA", - "DENVER, CO": "DENVE", - "ENDOWMENT HOUSE": "EHOUS", - "FRANKFURT": "FRANK", - "FREIBERG": "FREIB", - "GUATAMALA": "GUATE", - "GUAYAQUIL, ECUADOR": "GUAYA", - "HARTFORD, CONN": "HARTF", - "HAWAII": "HAWAI", - "HONG KONG": "HKONG", - "IDAHO FALLS, ID": "IFALL", - "JOHANNESBURG, S.A.": "JOHAN", - "JORDAN RIVER, UT": "JRIVE", - "LAS VEGAS, NV": "LVEGA", - "LIMA, PERU": "LIMA" , - "LOGAN, UT": "LOGAN", - "LONDON": "LONDO", - "LOS ANGELES, CA": "LANGE", - "MADRID, SPAIN": "MADRI", - "MANILA, PHILIPPINES": "MANIL", - "MANTI, UT": "MANTI", - "MEXICO CITY": "MEXIC", - "MT. TIMPANOGAS, UT": "MTIMP", - "NASHVILLE, TENN": "NASHV", - "NAUVOO": "NAUVO", - "NEW ZEALAND": "NZEAL", - "NUKU'ALOFA, TONGA": "NUKUA", - "OAKLAND, CA": "OAKLA", - "OGDEN, UT": "OGDEN", - "ORLANDO, FL": "ORLAN", - "PAPEETE, TAHITI": "PAPEE", - "PORTLAND, OR": "PORTL", - "PRESIDENT'S OFFICE": "POFFI", - "PRESTON, ENG": "PREST", - "PROVO, UT": "PROVO", - "RECIFE, BRAZIL": "RECIF", - "SALT LAKE, UT": "SLAKE", - "SAN DIEGO, CA": "SDIEG", - "SANTIAGO, CHILE": "SANTI", - "SANTO DOMINGO, D.R.": "SDOMI", - "SAO PAULO, BRAZ": "SPAUL", - "SEATTLE, WA": "SEATT", - "SEOUL, KOREA": "SEOUL", - "ST. GEORGE, UT": "SGEOR", - "ST. LOUIS, MISSOURI": "SLOUI", - "STOCKHOLM, SWDN": "STOCK", - "SWISS": "SWISS", - "SYDNEY, AUST": "SYDNE", - "TAIPEI, TAIWAN": "TAIPE", - "TOKYO, JAPAN": "TOKYO", - "TORONTO, CAN.": "TORNO", - "VERNAL, UT.": "VERNA", - "WASHINGTON, DC": "WASHI", + "Cardston, Alberta" : "ALBER", + "Apia, Samoa" : "APIA", + "Mesa, Arizona" : "ARIZO", + "Atlanta Georgia" : "ATLAN", + "Bogota Columbia" : "BOGOT", + "Boise Idaho" : "BOISE", + "Bountiful Utah" : "BOUNT", + "Buenos Aires, Argentina" : "BAIRE", + "Chicago, Illinois" : "CHICA", + "Cochabamba, Boliva" : "COCHA", + "Dallas, Texas" : "DALLA", + "Denver, Colorado" : "DENVE", + "Endowment House" : "EHOUS", + "Frankfurt, Germany" : "FRANK", + "Freiberg, Germany" : "FREIB", + "Guatamala City, Guatamala": "GUATE", + "Guayaquil, Ecuador" : "GUAYA", + "Hartford, Connecticut" : "HARTF", + "Laie, Hawaii" : "HAWAI", + "Hong Kong, China" : "HKONG", + "Idaho Falls, Idaho" : "IFALL", + "Johannesburg, South Africa" : "JOHAN", + "Sourth Jordan, Utah" : "JRIVE", + "Las Vegas, Nevada" : "LVEGA", + "Lima, Peru" : "LIMA" , + "Logan, Utah" : "LOGAN", + "London, England" : "LONDO", + "Los Angeles, California" : "LANGE", + "Madrid, Spain" : "MADRI", + "Manila, Philippines" : "MANIL", + "Manti, Utah" : "MANTI", + "Mexico City, Mexico" : "MEXIC", + "American Fork, Utah" : "MTIMP", + "Nashville, Tennessee" : "NASHV", + "Nauvoo, Illinois" : "NAUVO", + "Hamilton, New Zealand" : "NZEAL", + "Nuku'alofa, Tonga" : "NUKUA", + "Oakland, California" : "OAKLA", + "Ogden, Utah" : "OGDEN", + "Orlando, Florida" : "ORLAN", + "Papeete, Tahiti" : "PAPEE", + "Portland, Oregon" : "PORTL", + "President's Office" : "POFFI", + "Preston, England" : "PREST", + "Provo, Utah" : "PROVO", + "Recife, Brazil" : "RECIF", + "Salt Lake City, Utah" : "SLAKE", + "San Diego, California" : "SDIEG", + "Santiago, Chile" : "SANTI", + "Santo Domingo, Dominican Republic" : "SDOMI", + "Sao Paulo, Brazil" : "SPAUL", + "Seattle, Washington" : "SEATT", + "Seoul, South Korea" : "SEOUL", + "St. George, Utah" : "SGEOR", + "St. Louis, Missouri" : "SLOUI", + "Stockholm, Sweden" : "STOCK", + "Bern, Switzerland" : "SWISS", + "Sydney, Australia" : "SYDNE", + "Taipei, Taiwan" : "TAIPE", + "Tokyo, Japan" : "TOKYO", + "Toronto, Ontario" : "TORNO", + "Vernal, Utah" : "VERNA", + "Washington, D.C." : "WASHI", } lds_temple_to_abrev = { - "ALBER": "ALBERTA" , - "SAMOA": "APIA" , - "AP": "APIA" , - "APIA": "APIA" , - "ARIZO": "ARIZONA" , - "AZ": "ARIZONA" , - "ATLAN": "ATLANTA GA", - "AT": "ATLANTA GA", - "BOGOT": "BOGOTA COL.", - "BG": "BOGOTA COL.", - "BOISE": "BOISE ID", - "BO": "BOISE ID", - "BOUNT": "BOUNTIFUL UT", - "BAIRE": "BUENOS AIRES", - "BA": "BUENOS AIRES", - "CHICA": "CHICAGO IL", - "CH": "CHICAGO IL", - "COCHA": "COCHABAMBA, BOLIVA", - "DALLA": "DALLAS, TX", - "DA": "DALLAS, TX", - "DENVE": "DENVER, CO", - "DV": "DENVER, CO", - "EHOUS": "ENDOWMENT HOUSE", - "EH": "ENDOWMENT HOUSE", - "FRANK": "FRANKFURT", - "FR": "FRANKFURT", - "FREIB": "FREIBERG", - "FD": "FREIBERG", - "GUATE": "GUATAMALA", - "GA": "GUATAMALA", - "GUAYA": "GUAYAQUIL, ECUADOR", - "GY": "GUAYAQUIL, ECUADOR", - "HARTF": "HARTFORD, CONN", - "HAWAI": "HAWAII", - "HA": "HAWAII", - "HKONG": "HONG KONG", - "IFALL": "IDAHO FALLS, ID", - "IF": "IDAHO FALLS, ID", - "JOHAN": "JOHANNESBURG, S.A.", - "JO": "JOHANNESBURG, S.A.", - "JRIVE": "JORDAN RIVER, UT", - "JR": "JORDAN RIVER, UT", - "LVEGA": "LAS VEGAS, NV", - "LV": "LAS VEGAS, NV", - "LIMA" : "LIMA, PERU", - "LI": "LIMA, PERU", - "LOGAN": "LOGAN, UT", - "LG": "LOGAN, UT", - "LONDO": "LONDON", - "LD": "LONDON", - "LANGE": "LOS ANGELES, CA", - "LA": "LOS ANGELES, CA", - "MADRI": "MADRID, SPAIN", - "MANIL": "MANILA, PHILIPPINES", - "MA": "MANILA, PHILIPPINES", - "MANTI": "MANTI, UT", - "MT": "MANTI, UT", - "MEXIC": "MEXICO CITY", - "MX": "MEXICO CITY", - "MTIMP": "MT. TIMPANOGAS, UT", - "NASHV": "NASHVILLE, TENN", - "NAUVO": "NAUVOO", - "NZEAL": "NEW ZEALAND", - "NZ": "NEW ZEALAND", - "NUKUA": "NUKU'ALOFA, TONGA", - "TG": "NUKU'ALOFA, TONGA", - "OAKLA": "OAKLAND, CA", - "OK": "OAKLAND, CA", - "OGDEN": "OGDEN, UT", - "OG": "OGDEN, UT", - "ORLAN": "ORLANDO, FL", - "PAPEE": "PAPEETE, TAHITI", - "TA": "PAPEETE, TAHITI", - "PORTL": "PORTLAND, OR", - "PT": "PORTLAND, OR", - "POFFI": "PRESIDENT'S OFFICE", - "PREST": "PRESTON, ENG", - "PROVO": "PROVO, UT", - "PV": "PROVO, UT", - "RECIF": "RECIFE, BRAZIL", - "SLAKE": "SALT LAKE, UT", - "SL": "SALT LAKE, UT", - "SDIEG": "SAN DIEGO, CA", - "SA": "SAN DIEGO, CA", - "SANTI": "SANTIAGO, CHILE", - "SN": "SANTIAGO, CHILE", - "SDOMI": "SANTO DOMINGO, D.R.", - "SPAUL": "SAO PAULO, BRAZ", - "SP": "SAO PAULO, BRAZ", - "SEATT": "SEATTLE, WA", - "SE": "SEATTLE, WA", - "SEOUL": "SEOUL, KOREA", - "SO": "SEOUL, KOREA", - "SGEOR": "ST. GEORGE, UT", - "SG": "ST. GEORGE, UT", - "SLOUI": "ST. LOUIS, MISSOURI", - "STOCK": "STOCKHOLM, SWDN", - "ST": "STOCKHOLM, SWDN", - "SWISS": "SWISS", - "SW": "SWISS", - "SYDNE": "SYDNEY, AUST", - "SD": "SYDNEY, AUST", - "TAIPE": "TAIPEI, TAIWAN", - "TP": "TAIPEI, TAIWAN", - "TOKYO": "TOKYO, JAPAN", - "TK": "TOKYO, JAPAN", - "TORNO": "TORONTO, CAN.", - "TR": "TORONTO, CAN.", - "VERNA": "VERNAL, UT.", - "WASHI": "WASHINGTON, DC", - "WA": "WASHINGTON, DC", + "ALBER": "Cardston, Alberta", + "APIA" : "Apia, Samoa", + "AP" : "Apia, Samoa", + "ARIZO": "Mesa, Arizona", + "AZ" : "Mesa, Arizona", + "ATLAN": "Atlanta, Georgia", + "AT" : "Atlanta, Georgia", + "BOGOT": "Bogota, Columbia", + "BG" : "Bogota, Columbia", + "BOISE": "Boise Idaho", + "BO" : "Boise Idaho", + "BOUNT": "Bountiful, Utah", + "BAIRE": "Buenos Aires, Argentina", + "BA" : "Buenos Aires, Argentina", + "CHICA": "Chicago, Illinois", + "CH" : "Chicago, Illinois", + "COCHA": "Cochabamba, Boliva", + "DALLA": "Dallas, Texas", + "DA" : "Dallas, Texas", + "DENVE": "Denver, Colorado", + "DV" : "Denver, Colorado", + "EHOUS": "Endowment House", + "EH" : "Endowment House", + "FRANK": "Frankfurt, Germany", + "FR" : "Frankfurt, Germany", + "FREIB": "Freiberg, Germany", + "FD" : "Freiberg, Germany", + "GUATE": "Guatamala City, Guatamala", + "GA" : "Guatamala City, Guatamala", + "GUAYA": "Guayaquil, Ecuador", + "GY" : "Guayaquil, Ecuador", + "HARTF": "Hartford, Connecticut", + "HAWAI": "Laie, Hawaii", + "HA" : "Laie, Hawaii", + "HKONG": "Hong Kong, China", + "IFALL": "Idaho Falls, Idaho", + "IF" : "Idaho Falls, Idaho", + "JOHAN": "Johannesburg, South Africa", + "JO" : "Johannesburg, South Africa", + "JRIVE": "South Jordan, Utah", + "JR" : "South Jorhan, Utah", + "LVEGA": "Las Vegas, Nevada", + "LV" : "Las Vegas, Nevada", + "LIMA" : "Lima, Peru", + "LI" : "Lima, Peru", + "LOGAN": "Logan, Utah", + "LG" : "Logan, Utah", + "LONDO": "London, England", + "LD" : "London, England", + "LANGE": "Los Angeles, California", + "LA" : "Los Angeles, California", + "MADRI": "Madrid, Spain", + "MANIL": "Manila, Philippines", + "MA" : "Manila, Philippines", + "MANTI": "Manti, Utah", + "MT" : "Manti, Utah", + "MEXIC": "Mexico City, Mexico", + "MX" : "Mexico City, Mexico", + "MTIMP": "American Fork, Utah", + "NASHV": "Nashville, Tennessee", + "NAUVO": "Nauvoo, Illinois", + "NZEAL": "Hamilton, New Zealand", + "NZ" : "Hamilton, New Zealand", + "NUKUA": "Nuku'alofa, Tonga", + "TG" : "Nuku'alofa, Tonga", + "OAKLA": "Oakland, California", + "OK" : "Oakland, California", + "OGDEN": "Ogden, Utah", + "OG" : "Ogden, Utah", + "ORLAN": "Orlando, Florida", + "PAPEE": "Papeete, Tahiti", + "TA" : "Papeete, Tahiti", + "PORTL": "Portland, Oregon", + "PT" : "Portland, Oregon", + "POFFI": "President's Office", + "PREST": "Preston, England", + "PROVO": "Provo, Utah", + "PV" : "Provo, Utah", + "RECIF": "Recife, Brazil", + "SLAKE": "Salt Lake City, Utah", + "SL" : "Salt Lake City, Utah", + "SDIEG": "San Diego, California", + "SA" : "San Diego, California", + "SANTI": "Santiago, Chile", + "SN" : "Santiago, Chile", + "SDOMI": "Santo Domingo, Dominican Republic", + "SPAUL": "Sao Paulo, Brazil", + "SP" : "Sao Paulo, Brazil", + "SEATT": "Seattle, Washington", + "SE" : "Seattle, Washington", + "SEOUL": "Seoul, South Korea", + "SO" : "Seoul, South Korea", + "SGEOR": "St. George, Utah", + "SG" : "St. George, Utah", + "SLOUI": "St. Louis, Missouri", + "STOCK": "Stockholm, Sweden", + "ST" : "Stockholm, Sweden", + "SWISS": "Bern, Switzerland", + "SW" : "Bern, Switzerland", + "SYDNE": "Sydney, Australia", + "SD" : "Sydney, Australia", + "TAIPE": "Taipei, Taiwan", + "TP" : "Taipei, Taiwan", + "TOKYO": "Tokyo, Japan", + "TK" : "Tokyo, Japan", + "TORNO": "Toronto, Ontario", + "TR" : "Toronto, Ontario", + "VERNA": "Vernal, Utah", + "WASHI": "Washington, D.C.", + "WA" : "Washington, D.C.", } diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py index f05330ace..9a6f21184 100755 --- a/gramps/src/gramps_main.py +++ b/gramps/src/gramps_main.py @@ -952,11 +952,11 @@ def sort_child_list(clist): clist.sort() if ListColors.get_enable(): try: - oddbg = GdkColor(ListColors.oddbg[0],ListColors.oddbg[1],ListColors.oddbg[2]) - oddfg = GdkColor(ListColors.oddfg[0],ListColors.oddfg[1],ListColors.oddfg[2]) - evenbg = GdkColor(ListColors.evenbg[0],ListColors.evenbg[1],ListColors.evenbg[2]) - evenfg = GdkColor(ListColors.evenfg[0],ListColors.evenfg[1],ListColors.evenfg[2]) - ancestorfg = GdkColor(ListColors.ancestorfg[0],ListColors.ancestorfg[1],ListColors.ancestorfg[2]) + oddbg = gtk.GdkColor(ListColors.oddbg[0],ListColors.oddbg[1],ListColors.oddbg[2]) + oddfg = gtk.GdkColor(ListColors.oddfg[0],ListColors.oddfg[1],ListColors.oddfg[2]) + evenbg = gtk.GdkColor(ListColors.evenbg[0],ListColors.evenbg[1],ListColors.evenbg[2]) + evenfg = gtk.GdkColor(ListColors.evenfg[0],ListColors.evenfg[1],ListColors.evenfg[2]) + ancestorfg = gtk.GdkColor(ListColors.ancestorfg[0],ListColors.ancestorfg[1],ListColors.ancestorfg[2]) rows = clist.rows for i in range(0,rows): clist.set_background(i,(evenbg,oddbg)[i%2]) diff --git a/gramps/src/marriage.glade b/gramps/src/marriage.glade index 48e4065d5..1aba464b5 100644 --- a/gramps/src/marriage.glade +++ b/gramps/src/marriage.glade @@ -1357,6 +1357,180 @@ 0 0 + + + GtkVBox + vbox35 + False + 0 + + + GtkLabel + label233 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 5 + False + False + + + + + GtkHSeparator + hseparator6 + + 5 + False + True + + + + + GtkTable + table11 + 2 + 2 + False + 0 + 0 + + 0 + True + True + + + + GtkLabel + label234 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 5 + 5 + + 0 + 1 + 0 + 1 + 0 + 0 + False + False + False + False + True + False + + + + + GtkLabel + label235 + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 5 + 5 + + 0 + 1 + 1 + 2 + 0 + 0 + False + False + False + False + True + False + + + + + GtkEntry + lds_date + True + True + True + 0 + + + 1 + 2 + 0 + 1 + 5 + 5 + True + False + False + False + True + False + + + + + GtkCombo + lds_temple + True + True + False + True + False + + + 1 + 2 + 1 + 2 + 5 + 5 + True + False + False + False + True + False + + + + GtkEntry + GtkCombo:entry + combo-entry2 + True + True + True + 0 + + + + + + + + GtkLabel + Notebook:tab + label232 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + diff --git a/gramps/src/plugins/ReadGedcom.py b/gramps/src/plugins/ReadGedcom.py index 66e3629d9..48faed3e7 100644 --- a/gramps/src/plugins/ReadGedcom.py +++ b/gramps/src/plugins/ReadGedcom.py @@ -470,6 +470,7 @@ class GedcomParser: def parse_individual(self): name_cnt = 0 + note = "" while 1: matches = self.get_next() @@ -513,7 +514,11 @@ class GedcomParser: self.parse_person_object(2) elif matches[1] == "NOTE": if not string.strip(matches[2]) or matches[2] and matches[2][0] != "@": - note = matches[2] + self.parse_continue_data() + note = self.person.getNote() + if note == "": + note = matches[2] + self.parse_continue_data() + else: + note = "%s\n\n%s%s" % (note,matches[2],self.parse_continue_data()) self.person.setNote(note) self.ignore_sub_junk(2) else: @@ -533,7 +538,10 @@ class GedcomParser: elif matches[1] == "FAMS": family = self.db.findFamily(matches[2],self.fmap) self.person.addFamily(family) - note = self.parse_optional_note(2) + if note == "": + note = self.parse_optional_note(2) + else: + note = "%s\n\n%s" % (note,self.parse_optional_note(2)) elif matches[1] == "FAMC": type,note = self.parse_famc_type(2) family = self.db.findFamily(matches[2],self.fmap) @@ -1039,12 +1047,14 @@ class GedcomParser: if attr.getValue() == "": attr.setValue(val) self.ignore_sub_junk(level+1) + elif matches[1] == "DATE": + note = "%s\n\n" % ("Date : %s" % matches[2]) elif matches[1] == "NOTE": info = matches[2] + self.parse_continue_data() if note == "": note = info else: - note = "\n%s" % info + note = "%s\n\n%s" % (note,info) elif matches[1] == "CONC": if self.broken_conc: attr.setValue("%s %s" % (attr.getValue(), matches[2])) @@ -1054,6 +1064,8 @@ class GedcomParser: attr.setValue("%s\n%s" % (attr.getValue(),matches[2])) else: self.barf(level+1) + if note != "": + attr.setNote(note) def parse_family_event(self,event,level): global ged2fam