* src/RelLib.py: Move constants back to RelLib, as class attributes.

* src/Utils.py: Move constant mappings from const.py.in
* src/const.py.in: Move constants and mappings elsewhere.
* various: Use constants from RelLib, not const.


svn: r4736
This commit is contained in:
Alex Roitman
2005-05-30 20:41:43 +00:00
parent a766caa5b9
commit 095915429d
16 changed files with 485 additions and 545 deletions

View File

@@ -328,7 +328,7 @@ class IsFemale(Rule):
description = _('Matches all females')
def apply(self,db,handle):
return db.get_person_from_handle(handle).get_gender() == const.FEMALE
return db.get_person_from_handle(handle).get_gender() == RelLib.Person.FEMALE
#-------------------------------------------------------------------------
#
@@ -343,7 +343,7 @@ class HasUnknownGender(Rule):
description = _('Matches all people with unknown gender')
def apply(self,db,handle):
return db.get_person_from_handle(handle).get_gender() == const.UNKNOWN
return db.get_person_from_handle(handle).get_gender() == RelLib.Person.UNKNOWN
#-------------------------------------------------------------------------
#
@@ -970,7 +970,7 @@ class IsMale(Rule):
description = _('Matches all males')
def apply(self,db,handle):
return db.get_person_from_handle(handle).get_gender() == const.MALE
return db.get_person_from_handle(handle).get_gender() == RelLib.Person.MALE
#-------------------------------------------------------------------------
#