2007-08-21 Don Allingham <don@gramps-project.org>
* src/GrampsDbUtils/_GedcomParse.py: code cleanup * src/GrampsDbUtils/_GedcomLex.py: code cleanup * src/GrampsDbUtils/_WriteGedcom.py: code cleanup svn: r8852
This commit is contained in:
parent
052c9bc77b
commit
282fa4ac2e
@ -1,3 +1,8 @@
|
||||
2007-08-21 Don Allingham <don@gramps-project.org>
|
||||
* src/GrampsDbUtils/_GedcomParse.py: code cleanup
|
||||
* src/GrampsDbUtils/_GedcomLex.py: code cleanup
|
||||
* src/GrampsDbUtils/_WriteGedcom.py: code cleanup
|
||||
|
||||
2007-08-20 Jerome Rapinat <romjerome@yahoo.fr>
|
||||
* src/plugins/rel_fr.py: add support for get_plural_relationship_string()
|
||||
|
||||
|
@ -333,10 +333,6 @@ class Reader:
|
||||
TOKEN_CONC : self.__fix_token_conc,
|
||||
}
|
||||
|
||||
def set_broken_conc(self, broken):
|
||||
if broken:
|
||||
self.func_map[TOKEN_CONC] = self.__fix_token_broken_conc
|
||||
|
||||
def readline(self):
|
||||
if len(self.current_list) <= 1 and not self.eof:
|
||||
self.__readahead()
|
||||
@ -355,11 +351,6 @@ class Reader:
|
||||
new_value = line[2] + data[2]
|
||||
self.current_list[0] = (line[0], line[1], new_value, line[3], line[4])
|
||||
|
||||
def __fix_token_broken_conc(self, data):
|
||||
line = self.current_list[0]
|
||||
new_value = u"%s %s" % (line[2], data[2])
|
||||
self.current_list[0] = (line[0], line[1], new_value, line[3], line[4])
|
||||
|
||||
def __readahead(self):
|
||||
while len(self.current_list) < 5:
|
||||
line = self.ifile.readline()
|
||||
|
@ -2570,7 +2570,6 @@ class GedcomParser(UpdateCallback):
|
||||
|
||||
if int(event.get_type()) == RelLib.EventType.MARRIAGE:
|
||||
descr = event.get_description()
|
||||
print "EVENT", str(event.get_type()), descr
|
||||
if descr == "Civil Union":
|
||||
state.family.type.set(RelLib.FamilyRelType.CIVIL_UNION)
|
||||
event.set_description('')
|
||||
@ -4156,7 +4155,6 @@ class GedcomParser(UpdateCallback):
|
||||
@type state: CurrentState
|
||||
"""
|
||||
self.gedsource = self.gedmap.get_from_source_tag(line.data)
|
||||
self.lexer.set_broken_conc(self.gedsource.get_conc())
|
||||
if line.data.strip() == "FTW":
|
||||
self.is_ftw = True
|
||||
elif line.data == "Ancestry.com Family Trees":
|
||||
@ -4214,7 +4212,6 @@ class GedcomParser(UpdateCallback):
|
||||
"""
|
||||
if state.genby == "GRAMPS":
|
||||
self.gedsource = self.gedmap.get_from_source_tag(line.data)
|
||||
self.lexer.set_broken_conc(self.gedsource.get_conc())
|
||||
|
||||
def __header_plac(self, line, state):
|
||||
"""
|
||||
|
@ -70,9 +70,9 @@ except:
|
||||
# description on the same line as the tag
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
personalAttributeTakesParam = set(["CAST", "DSCR", "EDUC", "IDNO",
|
||||
"NATI", "NCHI", "NMR", "OCCU",
|
||||
"PROP", "RELI", "SSN", "TITL"])
|
||||
personalAttributeTakesParam = set(
|
||||
["CAST", "DSCR", "EDUC", "IDNO", "NATI", "NCHI",
|
||||
"NMR", "OCCU", "PROP", "RELI", "SSN", "TITL"])
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -303,16 +303,6 @@ class GedcomWriterOptionBox:
|
||||
self.filter_menu = build_filter_menu(the_filters)
|
||||
filter_obj.set_menu(self.filter_menu)
|
||||
|
||||
gedmap = GedcomInfo.GedcomInfoDB()
|
||||
|
||||
myMenu = gtk.Menu()
|
||||
for name in gedmap.get_name_list():
|
||||
menuitem = gtk.MenuItem(name)
|
||||
myMenu.append(menuitem)
|
||||
data = gedmap.get_description(name)
|
||||
menuitem.set_data("data", data)
|
||||
menuitem.show()
|
||||
|
||||
the_box = self.topDialog.get_widget('vbox1')
|
||||
the_parent = self.topDialog.get_widget('dialog-vbox1')
|
||||
the_parent.remove(the_box)
|
||||
@ -370,9 +360,6 @@ class GedcomWriter(UpdateCallback):
|
||||
if not setup_func():
|
||||
return
|
||||
|
||||
gedmap = GedcomInfo.GedcomInfoDB()
|
||||
self.target_ged = gedmap.standard
|
||||
|
||||
self.flist = set()
|
||||
self.slist = set()
|
||||
self.rlist = set()
|
||||
@ -431,9 +418,6 @@ class GedcomWriter(UpdateCallback):
|
||||
|
||||
self.plist = set(self.db.get_person_handles(sort_handles=False))
|
||||
|
||||
gedmap = GedcomInfo.GedcomInfoDB()
|
||||
self.target_ged = gedmap.standard
|
||||
|
||||
return True
|
||||
|
||||
def export_data(self, filename):
|
||||
@ -674,8 +658,7 @@ class GedcomWriter(UpdateCallback):
|
||||
if etype in (RelLib.EventType.BIRTH, RelLib.EventType.DEATH):
|
||||
continue
|
||||
|
||||
val = GedcomInfo.personalConstantEvents.get(
|
||||
etype, self.target_ged.gramps2tag(etype))
|
||||
val = GedcomInfo.personalConstantEvents.get(etype, "")
|
||||
|
||||
if val and val.strip():
|
||||
if val in personalAttributeTakesParam:
|
||||
@ -882,9 +865,6 @@ class GedcomWriter(UpdateCallback):
|
||||
etype = int(event.get_type())
|
||||
val = GedcomInfo.familyConstantEvents.get(etype)
|
||||
|
||||
if val == None:
|
||||
val = self.target_ged.gramps2tag(etype)
|
||||
|
||||
if val:
|
||||
if (not event.get_date_object().is_empty()) \
|
||||
or event.get_place_handle():
|
||||
|
Loading…
Reference in New Issue
Block a user