* RelLib/_*.py: Make objects serialize all the way down to built-in

python objects, so that Gramps classes are never pickled.
* Date.py, CalSdn.py: Move to RelLib.
* src/dates/Date_*.py: Use new Date.
* src/plugins/*.py: Use new Date.
* src/GrampsDb/_*.py: Use new Date, new unserialize.
* src/*.py: Use new Date.


svn: r5875
This commit is contained in:
Alex Roitman
2006-02-03 22:03:53 +00:00
parent fd279d348c
commit 7329720f07
73 changed files with 1298 additions and 905 deletions

View File

@@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2005 Donald N. Allingham
# Copyright (C) 2000-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,6 +56,12 @@ class AddressBase:
else:
self.address_list = []
def serialize(self):
return [addr.serialize() for addr in self.address_list]
def unserialize(self,data):
self.address_list = [Address().unserialize(item) for item in data]
def add_address(self,address):
"""
Adds the L{Address} instance to the object's list of addresses