* src/GrampsInMemDB.py: handle null handle

* src/GrampsXMLDB.py: disable undo during normal read of database
* src/ReadGedcom.py: handle lines shorter than 50 lines, disable undo during
normal reads of the database
* src/ReadXML.py: disable undo during normal read of databas
* src/RelLib.py: revert Name.__cmp__ to Name.is_equal
* src/docgen/HTMLDoc.py: drop deprecated gnome.ui dialogs


svn: r3617
This commit is contained in:
Don Allingham
2004-10-10 21:16:44 +00:00
parent 695a98eff6
commit 72024c566d
11 changed files with 67 additions and 48 deletions

View File

@ -1958,38 +1958,38 @@ class Name(DataObj):
else:
return "%s %s, %s" % (first, self.surname.upper(), self.suffix)
def __cmp__(self,other):
def is_equal(self,other):
"""
compares to names to see if they are equal, return 0 if they
are not
"""
if self.first_name != other.first_name:
return 1
return False
if self.surname != other.surname:
return 1
return False
if self.patronymic != other.patronymic:
return 1
return False
if self.prefix != other.prefix:
return 1
return False
if self.suffix != other.suffix:
return 1
return False
if self.title != other.title:
return 1
return False
if self.type != other.type:
return 1
return False
if self.private != other.private:
return 1
return False
if self.get_note() != other.get_note():
return 1
return False
if len(self.get_source_references()) != len(other.get_source_references()):
return 1
return False
index = 0
olist = other.get_source_references()
for a in self.get_source_references():
if not a.are_equal(olist[index]):
return True
index += 1
return 0
return True
class Url:
"""Contains information related to internet Uniform Resource Locators,