* src/DateEdit.py: Take date object as an argument and work with it.
* src/AddrEdit.py: Use date object instead of text. * src/EditPerson.py: Use date object instead of text. * src/EventEdit.py: Use date object instead of text. * src/gramps.glade: Minor cleanup. * src/Date.py (copy): Add method. * src/RelLib.py (Address): Correct the use of dates. svn: r3556
This commit is contained in:
13
src/Date.py
13
src/Date.py
@ -120,6 +120,19 @@ class Date:
|
||||
self.sortval = 0
|
||||
self.comment = u""
|
||||
|
||||
def copy(self,source):
|
||||
"""
|
||||
Copy all the attributes of the given Date instance
|
||||
to the present instance, without creating a new object.
|
||||
"""
|
||||
self.calendar = source.calendar
|
||||
self.modifier = source.modifier
|
||||
self.quality = source.quality
|
||||
self.dateval = source.dateval
|
||||
self.text = source.text
|
||||
self.sortval = source.sortval
|
||||
self.comment = source.comment
|
||||
|
||||
def __cmp__(self,other):
|
||||
"""
|
||||
Comparison function. Allows the usage of equality tests.
|
||||
|
Reference in New Issue
Block a user