Fixed date handling for GEDCOM
svn: r600
This commit is contained in:
parent
be6a870a01
commit
13b2796ead
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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']))
|
||||
|
@ -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()
|
||||
|
@ -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)"""
|
||||
|
@ -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())
|
||||
|
||||
|
@ -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.",
|
||||
}
|
||||
|
@ -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])
|
||||
|
@ -1357,6 +1357,180 @@
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkVBox</class>
|
||||
<name>vbox35</name>
|
||||
<homogeneous>False</homogeneous>
|
||||
<spacing>0</spacing>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label233</name>
|
||||
<label>Spouse Sealing</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0.5</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<child>
|
||||
<padding>5</padding>
|
||||
<expand>False</expand>
|
||||
<fill>False</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkHSeparator</class>
|
||||
<name>hseparator6</name>
|
||||
<child>
|
||||
<padding>5</padding>
|
||||
<expand>False</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkTable</class>
|
||||
<name>table11</name>
|
||||
<rows>2</rows>
|
||||
<columns>2</columns>
|
||||
<homogeneous>False</homogeneous>
|
||||
<row_spacing>0</row_spacing>
|
||||
<column_spacing>0</column_spacing>
|
||||
<child>
|
||||
<padding>0</padding>
|
||||
<expand>True</expand>
|
||||
<fill>True</fill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label234</name>
|
||||
<label>Date</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>1</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<name>label235</name>
|
||||
<label>Temple</label>
|
||||
<justify>GTK_JUSTIFY_CENTER</justify>
|
||||
<wrap>False</wrap>
|
||||
<xalign>0</xalign>
|
||||
<yalign>0.5</yalign>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<child>
|
||||
<left_attach>0</left_attach>
|
||||
<right_attach>1</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>0</xpad>
|
||||
<ypad>0</ypad>
|
||||
<xexpand>False</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<name>lds_date</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>0</top_attach>
|
||||
<bottom_attach>1</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkCombo</class>
|
||||
<name>lds_temple</name>
|
||||
<value_in_list>True</value_in_list>
|
||||
<ok_if_empty>True</ok_if_empty>
|
||||
<case_sensitive>False</case_sensitive>
|
||||
<use_arrows>True</use_arrows>
|
||||
<use_arrows_always>False</use_arrows_always>
|
||||
<items></items>
|
||||
<child>
|
||||
<left_attach>1</left_attach>
|
||||
<right_attach>2</right_attach>
|
||||
<top_attach>1</top_attach>
|
||||
<bottom_attach>2</bottom_attach>
|
||||
<xpad>5</xpad>
|
||||
<ypad>5</ypad>
|
||||
<xexpand>True</xexpand>
|
||||
<yexpand>False</yexpand>
|
||||
<xshrink>False</xshrink>
|
||||
<yshrink>False</yshrink>
|
||||
<xfill>True</xfill>
|
||||
<yfill>False</yfill>
|
||||
</child>
|
||||
|
||||
<widget>
|
||||
<class>GtkEntry</class>
|
||||
<child_name>GtkCombo:entry</child_name>
|
||||
<name>combo-entry2</name>
|
||||
<can_focus>True</can_focus>
|
||||
<editable>True</editable>
|
||||
<text_visible>True</text_visible>
|
||||
<text_max_length>0</text_max_length>
|
||||
<text></text>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
<widget>
|
||||
<class>GtkLabel</class>
|
||||
<child_name>Notebook:tab</child_name>
|
||||
<name>label232</name>
|
||||
<label>LDS</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>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user