* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add nickname
upgrade. svn: r6556
This commit is contained in:
parent
e6b7375948
commit
43bc6b3e8c
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
2006-05-05 Alex Roitman <shura@gramps-project.org>
|
2006-05-05 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/DisplayTabs/_MediaBackRefList.py: Import model.
|
* src/DisplayTabs/_MediaBackRefList.py: Import model.
|
||||||
|
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Add nickname
|
||||||
|
upgrade.
|
||||||
|
|
||||||
2006-05-05 Don Allingham <don@gramps-project.org>
|
2006-05-05 Don Allingham <don@gramps-project.org>
|
||||||
* src/ViewManager.py: Add undo history menu entry
|
* src/ViewManager.py: Add undo history menu entry
|
||||||
|
@ -1135,11 +1135,11 @@ class GrampsBSDDB(GrampsDbBase):
|
|||||||
find_referenced_handle,open_flags)
|
find_referenced_handle,open_flags)
|
||||||
self.txn = None
|
self.txn = None
|
||||||
|
|
||||||
def undo(self):
|
def undo(self,update_history=True):
|
||||||
print "Undoing it"
|
print "Undoing it"
|
||||||
if self.UseTXN:
|
if self.UseTXN:
|
||||||
self.txn = self.env.txn_begin()
|
self.txn = self.env.txn_begin()
|
||||||
status = GrampsDbBase.undo(self)
|
status = GrampsDbBase.undo(self,update_history)
|
||||||
if self.UseTXN:
|
if self.UseTXN:
|
||||||
if status:
|
if status:
|
||||||
self.txn.commit()
|
self.txn.commit()
|
||||||
@ -1148,11 +1148,11 @@ class GrampsBSDDB(GrampsDbBase):
|
|||||||
self.txn = None
|
self.txn = None
|
||||||
return status
|
return status
|
||||||
|
|
||||||
def redo(self):
|
def redo(self,update_history=True):
|
||||||
print "Redoing it"
|
print "Redoing it"
|
||||||
if self.UseTXN:
|
if self.UseTXN:
|
||||||
self.txn = self.env.txn_begin()
|
self.txn = self.env.txn_begin()
|
||||||
status = GrampsDbBase.redo(self)
|
status = GrampsDbBase.redo(self,update_history)
|
||||||
if self.UseTXN:
|
if self.UseTXN:
|
||||||
if status:
|
if status:
|
||||||
self.txn.commit()
|
self.txn.commit()
|
||||||
@ -1391,7 +1391,7 @@ class GrampsBSDDB(GrampsDbBase):
|
|||||||
person.handle = handle
|
person.handle = handle
|
||||||
# Restore data from dbversion 8 (gramps 2.0.9)
|
# Restore data from dbversion 8 (gramps 2.0.9)
|
||||||
(junk_handle, person.gramps_id, person.gender,
|
(junk_handle, person.gramps_id, person.gender,
|
||||||
person.primary_name, person.alternate_names, person.nickname,
|
person.primary_name, person.alternate_names, nickname,
|
||||||
death_handle, birth_handle, event_list,
|
death_handle, birth_handle, event_list,
|
||||||
person.family_list, parent_family_list,
|
person.family_list, parent_family_list,
|
||||||
person.media_list, person.address_list, person.attribute_list,
|
person.media_list, person.address_list, person.attribute_list,
|
||||||
@ -1446,6 +1446,13 @@ class GrampsBSDDB(GrampsDbBase):
|
|||||||
for attribute in person.attribute_list:
|
for attribute in person.attribute_list:
|
||||||
convert_attribute_9(attribute)
|
convert_attribute_9(attribute)
|
||||||
|
|
||||||
|
# Nickname becomes an attribute
|
||||||
|
if nickname.strip():
|
||||||
|
attr = Attribute()
|
||||||
|
attr.set_type(AttributeType.NICKNAME)
|
||||||
|
attr.set_value(nickname)
|
||||||
|
person.attribute_list.append(attr)
|
||||||
|
|
||||||
# Cover attributes contained in MediaRefs
|
# Cover attributes contained in MediaRefs
|
||||||
for media_ref in person.media_list:
|
for media_ref in person.media_list:
|
||||||
convert_mediaref_9(media_ref)
|
convert_mediaref_9(media_ref)
|
||||||
|
Loading…
Reference in New Issue
Block a user