Fixes for ZODB mode
svn: r997
This commit is contained in:
parent
5557478bae
commit
28df0746c7
@ -47,6 +47,6 @@ class GrampsXML(GrampsDB):
|
|||||||
self.sourceTable = {}
|
self.sourceTable = {}
|
||||||
for key in self.sourceMap.keys():
|
for key in self.sourceMap.keys():
|
||||||
src = self.sourceMap[key]
|
src = self.sourceMap[key]
|
||||||
self.sourceTable[key] = source.getDisplayInfo()
|
self.sourceTable[key] = src.getDisplayInfo()
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
@ -1620,9 +1620,6 @@ class Family(Persistent):
|
|||||||
"""Sets the list of Photo objects"""
|
"""Sets the list of Photo objects"""
|
||||||
self.photoList = list
|
self.photoList = list
|
||||||
|
|
||||||
def unique_note(self):
|
|
||||||
self.note = Note(self.note.get())
|
|
||||||
|
|
||||||
def someChildIsAncestor(self):
|
def someChildIsAncestor(self):
|
||||||
for child in self.Children:
|
for child in self.Children:
|
||||||
if (child.getAncestor()):
|
if (child.getAncestor()):
|
||||||
|
@ -72,6 +72,7 @@ import EditPerson
|
|||||||
import Marriage
|
import Marriage
|
||||||
import Find
|
import Find
|
||||||
import VersionControl
|
import VersionControl
|
||||||
|
import ReadXML
|
||||||
|
|
||||||
from GrampsXML import GrampsXML
|
from GrampsXML import GrampsXML
|
||||||
try:
|
try:
|
||||||
@ -896,22 +897,19 @@ class Gramps:
|
|||||||
gnome.ui.GnomeErrorDialog(msg)
|
gnome.ui.GnomeErrorDialog(msg)
|
||||||
|
|
||||||
def delete_person_response(self):
|
def delete_person_response(self):
|
||||||
personmap = self.db.getPersonMap()
|
|
||||||
familymap = self.db.getPersonMap()
|
|
||||||
|
|
||||||
for family in self.active_person.getFamilyList():
|
for family in self.active_person.getFamilyList():
|
||||||
if self.active_person.getGender == Person.male:
|
if self.active_person.getGender == Person.male:
|
||||||
if family.getMother() == None:
|
if family.getMother() == None:
|
||||||
for child in family.getChildList():
|
for child in family.getChildList():
|
||||||
child.removeAltFamily(family)
|
child.removeAltFamily(family)
|
||||||
del familymap[family]
|
self.db.removeFamily(family)
|
||||||
else:
|
else:
|
||||||
family.setFather(None)
|
family.setFather(None)
|
||||||
else:
|
else:
|
||||||
if family.getFather() == None:
|
if family.getFather() == None:
|
||||||
for child in family.getChildList():
|
for child in family.getChildList():
|
||||||
child.removeAltFamily(family)
|
child.removeAltFamily(family)
|
||||||
del familymap[family]
|
self.db.removeFamily(family)
|
||||||
else:
|
else:
|
||||||
family.setMother(None)
|
family.setMother(None)
|
||||||
|
|
||||||
@ -1428,9 +1426,6 @@ class Gramps:
|
|||||||
def redisplay_person_list(self,person):
|
def redisplay_person_list(self,person):
|
||||||
pos = (person,0)
|
pos = (person,0)
|
||||||
self.id2col[person.getId()] = pos
|
self.id2col[person.getId()] = pos
|
||||||
gname = Utils.phonebook_from_name
|
|
||||||
bsn = sort.build_sort_name
|
|
||||||
bsd = sort.build_sort_date
|
|
||||||
|
|
||||||
if self.DataFilter.compare(person):
|
if self.DataFilter.compare(person):
|
||||||
self.person_list.insert(0,person.getDisplayInfo())
|
self.person_list.insert(0,person.getDisplayInfo())
|
||||||
@ -1824,7 +1819,6 @@ class Gramps:
|
|||||||
def apply_filter(self):
|
def apply_filter(self):
|
||||||
self.person_list.freeze()
|
self.person_list.freeze()
|
||||||
datacomp = self.DataFilter.compare
|
datacomp = self.DataFilter.compare
|
||||||
gname = Utils.phonebook_from_name
|
|
||||||
|
|
||||||
self.person_list.set_column_visibility(1,GrampsCfg.id_visible)
|
self.person_list.set_column_visibility(1,GrampsCfg.id_visible)
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class ReadNative:
|
|||||||
if name == "":
|
if name == "":
|
||||||
return
|
return
|
||||||
|
|
||||||
name = "%s/%s" % (name,const.indexFile)
|
name = "%s/%s" % (name,const.xmlFile)
|
||||||
Utils.destroy_passed_object(self.top)
|
Utils.destroy_passed_object(self.top)
|
||||||
importData(self.db,name,progress)
|
importData(self.db,name,progress)
|
||||||
self.callback(1)
|
self.callback(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user